Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / plugin / diagnostic-test-show-locus-no-labels.c
blob4c06368a201aa7d4dd9bd006e0641f39d2de42e6
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdiagnostics-show-caret -fno-diagnostics-show-labels" } */
4 /* Verify that -fno-diagnostics-show-labels works. */
6 /* This is a collection of unittests for diagnostic_show_locus;
7 see the overview in diagnostic_plugin_test_show_locus.c.
9 In particular, note the discussion of why we need a very long line here:
10 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
11 and that we can't use macros in this file. */
13 void test_multiline (void)
15 #if 0
16 x = (first_function ()
17 + second_function ()); /* { dg-warning "test" } */
19 /* This shouldn't have a label. */
20 /* { dg-begin-multiline-output "" }
21 x = (first_function ()
22 ~~~~~~~~~~~~~~~~~
23 + second_function ());
24 ^ ~~~~~~~~~~~~~~~~~~
25 { dg-end-multiline-output "" } */
26 #endif