view gcc/testsuite/c-c++-common/pr56493.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +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 } } } } */