]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/enum-mode-2.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / enum-mode-2.c
1 /* PR c/51147 - attribute((mode(byte))) on an enum generates wrong code */
2
3 /* { dg-do compile } */
4 /* { dg-additional-options "-O2 -fdump-tree-optimized" } */
5
6 enum _eq_bool
7 {
8 false,
9 true
10 } __attribute__((mode (byte)));
11
12 typedef enum _eq_bool bool;
13
14 bool foo (void);
15 bool bar (void);
16
17 bool test (void)
18 {
19 return foo () || bar ();
20 }
21
22 /* { dg-final { scan-tree-dump-times "foo|bar" 2 "optimized" } } */