OSDN Git Service

PR rtl-optimization/52139
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / foldconst-2.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-ch" } */
3 typedef union tree_node *tree;
4 enum tree_code
5 {
6   OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, POINTER_TYPE, FIXED_POINT_TYPE,
7 };
8 struct tree_base
9 {
10   unsigned public_flag:1;
11 };
12 struct tree_decl_with_vis
13 {
14   unsigned comdat_flag:1;
15 };
16 union tree_node
17 {
18   struct tree_base base;
19   struct tree_decl_with_vis decl_with_vis;
20 };
21 enum tree_index
22 {
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
26 };
27 extern tree global_trees[TI_MAX];
28 emit_support_tinfos (void)
29 {
30   static tree *const fundamentals[] = {
31     &global_trees[TI_VOID_TYPE], &global_trees[TI_BOOLEAN_TYPE],
32   };
33   int ix;
34   for (ix = 0; fundamentals[ix]; ix++)
35     {
36         {
37           tree tinfo;
38             {
39               ((void) (!(((tinfo)->base.public_flag) && !(__extension__ (
40                                                                           {
41                                                                           __typeof
42                                                                           (tinfo)
43                                                                           __t
44                                                                           =
45                                                                           (tinfo);
46                                                                           __t;}
47                                                           )->decl_with_vis.
48                                                           comdat_flag)) ?
49                        fancy_abort ("../../gcc/cp/rtti.c", 1529,
50                                     __FUNCTION__), 0 : 0));
51             }
52         }
53     }
54 }
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" "ch"} } */
58 /* { dg-final { cleanup-tree-dump "ch" } } */