view gcc/testsuite/gcc.dg/tree-ssa/pr72835.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR tree-optimization/72835.  */
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-require-effective-target int32plus } */

struct struct_1 {
    unsigned int m1 : 6 ;
    unsigned int m2 : 24 ;
    unsigned int m3 : 6 ;
};

unsigned short var_32 = 0x2d10;

struct struct_1 s1;

void init ()
{
  s1.m1 = 4;
  s1.m2 = 0x7ca4b8;
  s1.m3 = 24;
}

void foo ()
{
  unsigned int c
    = ((unsigned int) s1.m2) * (-((unsigned int) s1.m3))
    + (var_32) * (-((unsigned int) (s1.m1)));
  if (c != 4098873984)
    __builtin_abort ();
}

int main ()
{
    init ();
    foo ();
    return 0;
}