Merge from mainline (163495:164578).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / tree-ssa / foldconst-2.c
blob8fdad906a80f89dcfd97efdc9b5b71baccb3e0db
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
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 emit_support_tinfos (void)
30 static tree *const fundamentals[] = {
31 &global_trees[TI_VOID_TYPE], &global_trees[TI_BOOLEAN_TYPE],
33 int ix;
34 for (ix = 0; fundamentals[ix]; ix++)
37 tree tinfo;
39 ((void) (!(((tinfo)->base.public_flag) && !(__extension__ (
41 __typeof
42 (tinfo)
43 __t
45 (tinfo);
46 __t;}
47 )->decl_with_vis.
48 comdat_flag)) ?
49 fancy_abort ("../../gcc/cp/rtti.c", 1529,
50 __FUNCTION__), 0 : 0));
55 /* We should copy loop header to fundamentals[0] and then fold it way into
56 known value. */
57 /* { dg-final { scan-tree-dump-not "fundamentals.0" "optimized"} } */
58 /* { dg-final { cleanup-tree-dump "optimized" } } */