More fold_negate in match.pd
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr72835.c
blob468e0f02fcbceb04a6858a6e7721783057d83dde
1 /* PR tree-optimization/72835. */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
4 /* { dg-require-effective-target int32plus } */
6 struct struct_1 {
7 unsigned int m1 : 6 ;
8 unsigned int m2 : 24 ;
9 unsigned int m3 : 6 ;
12 unsigned short var_32 = 0x2d10;
14 struct struct_1 s1;
16 void init ()
18 s1.m1 = 4;
19 s1.m2 = 0x7ca4b8;
20 s1.m3 = 24;
23 void foo ()
25 unsigned int c
26 = ((unsigned int) s1.m2) * (-((unsigned int) s1.m3))
27 + (var_32) * (-((unsigned int) (s1.m1)));
28 if (c != 4098873984)
29 __builtin_abort ();
32 int main ()
34 init ();
35 foo ();
36 return 0;