libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / foldconst-2.c
blobe9a6f870b8015949441e6fa497d106c78e7904ac
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ch2" } */
3 typedef union tree_node *tree;
4 enum tree_code
6 OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, POINTER_TYPE, FIXED_POINT_TYPE,
7 };
8 struct tree_base
10 unsigned public_flag:1;
12 struct tree_decl_with_vis
14 unsigned comdat_flag:1;
16 union tree_node
18 struct tree_base base;
19 struct tree_decl_with_vis decl_with_vis;
21 enum tree_index
23 TI_LONG_DOUBLE_PTR_TYPE, TI_INTEGER_PTR_TYPE, TI_VOID_TYPE, TI_PTR_TYPE,
24 TI_VA_LIST_FPR_COUNTER_FIELD, TI_BOOLEAN_TYPE, TI_FILEPTR_TYPE,
25 TI_CURRENT_TARGET_PRAGMA, TI_CURRENT_OPTIMIZE_PRAGMA, TI_MAX
27 extern tree global_trees[TI_MAX];
28 void fancy_abort (const char *file, int line, const char *function);
29 void
30 emit_support_tinfos (void)
32 static tree *const fundamentals[] = {
33 &global_trees[TI_VOID_TYPE], &global_trees[TI_BOOLEAN_TYPE],
35 int ix;
36 for (ix = 0; fundamentals[ix]; ix++)
39 tree tinfo;
41 ((void) (!(((tinfo)->base.public_flag) && !(__extension__ (
43 __typeof
44 (tinfo)
45 __t
47 (tinfo);
48 __t;}
49 )->decl_with_vis.
50 comdat_flag)) ?
51 fancy_abort ("../../gcc/cp/rtti.c", 1529,
52 __FUNCTION__), 0 : 0));
57 /* We should copy loop header to fundamentals[0] and then fold it way into
58 known value. */
59 /* { dg-final { scan-tree-dump-not "fundamentals.0" "ch2"} } */