Fix ICE for missing header fix-it hints with overlarge #line directives (PR c/84852)
[official-gcc.git] / gcc / testsuite / gcc.dg / fixits-pr84852-2.c
blob0674ef546891f2f02f66c239fedd9abb49c3554e
1 /* This is padding (to avoid the output containing DejaGnu directives). */
3 /* We need -fdiagnostics-show-caret to trigger the ICE. */
5 /* { dg-options "-fdiagnostics-show-caret -pedantic-errors -Wno-implicit-function-declaration" } */
7 #line 7777777777 /* { dg-error "line number out of range" } */
8 /* { dg-begin-multiline-output "" }
9 #line 7777777777
10 ^~~~~~~~~~
11 { dg-end-multiline-output "" } */
13 int foo (void) { return strlen(""); }
15 /* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } -812156810 } */
16 /* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } -812156810 } */
17 #if 0
18 { dg-begin-multiline-output "" }
19 +#include <string.h>
20 /* This is padding (to avoid the output containing DejaGnu directives). */
21 { dg-end-multiline-output "" }
22 #endif
24 /* We need this, to consume a stray line marker for the bogus line. */
25 /* { dg-regexp ".*fixits-pr84852-2.c:-812156810:25:" } */