Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / plugin / diagnostic-test-show-locus-bw-line-numbers-2.c
bloba9d022a250aad9bfe54da4a726fc754031286865
1 /* { dg-do compile } */
2 /* Verify "-fdiagnostics-minimum-margin-width=0". */
3 /* { dg-options "-O -fdiagnostics-show-caret -fdiagnostics-show-line-numbers -fdiagnostics-minimum-margin-width=0" } */
5 /* This is a collection of unittests for diagnostic_show_locus;
6 see the overview in diagnostic_plugin_test_show_locus.c.
8 In particular, note the discussion of why we need a very long line here:
9 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
10 and that we can't use macros in this file. */
12 void test_simple (void)
14 #if 0
15 myvar = myvar.x; /* { dg-warning "test" } */
17 /* { dg-begin-multiline-output "" }
18 15 | myvar = myvar.x;
19 | ~~~~~^~
20 { dg-end-multiline-output "" } */
21 #endif