gccint: GIMPLE Tests

1 
1 7.10 Support for testing GIMPLE passes
1 ======================================
1 
1 As of gcc 7, C functions can be tagged with '__GIMPLE' to indicate that
1 the function body will be GIMPLE, rather than C. The compiler requires
1 the option '-fgimple' to enable this functionality.  For example:
1 
1      /* { dg-do compile } */
1      /* { dg-options "-O -fgimple" } */
1 
1      void __GIMPLE (startwith ("dse2")) foo ()
1      {
1        int a;
1 
1      bb_2:
1        if (a > 4)
1          goto bb_3;
1        else
1          goto bb_4;
1 
1      bb_3:
1        a_2 = 10;
1        goto bb_5;
1 
1      bb_4:
1        a_3 = 20;
1 
1      bb_5:
1        a_1 = __PHI (bb_3: a_2, bb_4: a_3);
1        a_4 = a_1 + 4;
1 
1        return;
1      }
1 
1  The 'startwith' argument indicates at which pass to begin.
1 
1  Use the dump modifier '-gimple' (e.g.  '-fdump-tree-all-gimple') to
1 make tree dumps more closely follow the format accepted by the GIMPLE
1 parser.
1 
1  Example DejaGnu tests of GIMPLE can be seen in the source tree at
1 'gcc/testsuite/gcc.dg/gimplefe-*.c'.
1 
1  The '__GIMPLE' parser is integrated with the C tokenizer and
1 preprocessor, so it should be possible to use macros to build out test
1 coverage.
1