2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ifc-4.c
blob058fd84b8f0d83c9835ad04ce80a1b61fd01bbd2
1 /* { dg-do compile } */
2 /* { dg-options "-c -O2 -ftree-vectorize -fdump-tree-ifcvt-stats" { target *-*-* } } */
4 struct ht
6 void * (*alloc_subobject) (int);
7 };
8 typedef struct cpp_reader cpp_reader;
9 typedef struct cpp_token cpp_token;
10 typedef struct cpp_macro cpp_macro;
11 enum cpp_ttype
13 CPP_PASTE,
15 struct cpp_token {
16 __extension__ enum cpp_ttype type : 8;
17 } cpp_comment_table;
18 struct cpp_macro {
19 union cpp_macro_u
21 cpp_token * tokens;
22 } exp;
23 unsigned int count;
25 struct cpp_reader
27 struct ht *hash_table;
29 void
30 create_iso_definition (cpp_reader *pfile, cpp_macro *macro)
32 unsigned int num_extra_tokens = 0;
34 cpp_token *tokns =
35 (cpp_token *) pfile->hash_table->alloc_subobject (sizeof (cpp_token)
36 * macro->count);
38 cpp_token *normal_dest = tokns;
39 cpp_token *extra_dest = tokns + macro->count - num_extra_tokens;
40 unsigned int i;
41 for (i = 0; i < macro->count; i++)
43 if (macro->exp.tokens[i].type == CPP_PASTE)
44 *extra_dest++ = macro->exp.tokens[i];
45 else
46 *normal_dest++ = macro->exp.tokens[i];
52 /* This cannot be if-converted because the stores are to aggregate types. */
53 /* { dg-final { scan-tree-dump-times "Applying if-conversion" 0 "ifcvt" } } */