]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr90866-2.c
[testsuite] Add missing dg-require-effective-target global_constructor
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr90866-2.c
1 /* PR tree-optimization/90866 - ICE in fold_binary_loc, at fold-const.c:9827
2 { dg-do compile }
3 { dg-require-effective-target global_constructor }
4 { dg-options "-O2 -fsanitize=thread" }
5 */
6
7 typedef enum { a } b;
8 typedef struct {
9 int c[0];
10 } d;
11 typedef struct {
12 int *data;
13 } e;
14 typedef struct {
15 e buffer;
16 } f;
17 int g, h;
18
19 int i(f *j, d *k, b l, int m) {
20 if (l)
21 if (m) {
22 h = j->buffer.data[0];
23 k->c[g] = k->c[g] * 8;
24 }
25 return 0;
26 }