view gcc/testsuite/c-c++-common/pr56493.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

/* PR c++/56493 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-gimple" } */

unsigned long long bar (void);
int x;

void
foo (void)
{
  x += bar ();
}

/* Verify we narrow the addition from unsigned long long to unsigned int type.  */
/* { dg-final { scan-tree-dump "  (\[a-zA-Z._0-9$]*) = \\(unsigned int\\) \[^;\n\r]*;.*  (\[a-zA-Z._0-9$]*) = \\(unsigned int\\) \[^;\n\r]*;.* = \\1 \\+ \\2;" "gimple" { target { ilp32 || lp64 } } } } */