view gcc/testsuite/c-c++-common/ubsan/shift-11.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* PR c++/84590 */
/* { dg-do compile } */
/* { dg-options "-fsanitize=shift" } */

struct S {
  int b;
};

void
fn (void)
{
  struct S c1 = { 1 << -1 }; /* { dg-warning "left shift" } */
}