view gcc/testsuite/gcc.dg/multiple-overflow-warn-1.c @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR c/19978 : Test for duplicated warnings (unary operators).  */
/* { dg-do compile } */
/* { dg-options "-std=c99 -Woverflow" } */

#include <limits.h>

int 
g (void)
{
  return - - - - -INT_MIN; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
  /* { dg-warning "integer overflow in expression" "" { target *-*-* } .-1 } */
}