view gcc/testsuite/gcc.dg/fixits-pr84852-2.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 84e7813d76e9
children
line wrap: on
line source

/* This is padding (to avoid the output containing DejaGnu directives).  */

/* We need -fdiagnostics-show-caret to trigger the ICE.  */

/* { dg-options "-fdiagnostics-show-caret -pedantic-errors -Wno-implicit-function-declaration" } */

#line 7777777777 /* { dg-error "line number out of range" } */
/* { dg-begin-multiline-output "" }
 #line 7777777777
       ^~~~~~~~~~
   { dg-end-multiline-output "" } */

int foo (void) { return strlen(""); }

/* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } -812156810 } */
/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } 1 } */
#if 0
{ dg-begin-multiline-output "" }
+#include <string.h>
 /* This is padding (to avoid the output containing DejaGnu directives).  */
{ dg-end-multiline-output "" }
#endif