2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
8 Support for testing GIMPLE passes
9 *********************************
11 As of gcc 7, C functions can be tagged with ``__GIMPLE`` to indicate
12 that the function body will be GIMPLE, rather than C. The compiler requires
13 the option :option:`-fgimple` to enable this functionality. For example:
17 /* { dg-do compile } */
18 /* { dg-options "-O -fgimple" } */
20 void __GIMPLE (startwith ("dse2")) foo ()
38 a_1 = __PHI (bb_3: a_2, bb_4: a_3);
44 The ``startwith`` argument indicates at which pass to begin.
46 Use the dump modifier ``-gimple`` (e.g. :option:`-fdump-tree-all-gimple`)
47 to make tree dumps more closely follow the format accepted by the GIMPLE
50 Example DejaGnu tests of GIMPLE can be seen in the source tree at
51 :samp:`gcc/testsuite/gcc.dg/gimplefe-*.c`.
53 The ``__GIMPLE`` parser is integrated with the C tokenizer and
54 preprocessor, so it should be possible to use macros to build out