Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/plugin/diagnostic-test-inlining-1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-Wno-attributes -fdiagnostics-show-caret" } */ | |
3 | |
4 extern void __emit_warning (const char *message); | |
5 | |
6 /* Verify that the diagnostic subsytem describes the chain of inlining | |
7 when reporting the warning. */ | |
8 | |
9 __attribute__((always_inline)) | |
10 static void foo (void) | |
11 { | |
12 __emit_warning ("message"); | |
13 } | |
14 | |
15 __attribute__((always_inline)) | |
16 static void bar (void) | |
17 { | |
18 foo (); | |
19 } | |
20 | |
21 int main() | |
22 { | |
23 bar (); | |
24 return 0; | |
25 } | |
26 | |
27 /* { dg-regexp "In function 'void foo\\(\\)'," "" } */ | |
28 /* { dg-regexp " inlined from 'void bar\\(\\)' at .+/diagnostic-test-inlining-1.C:18:7," "" } */ | |
29 /* { dg-regexp " inlined from 'int main\\(\\)' at .+/diagnostic-test-inlining-1.C:23:7:" "" } */ | |
30 /* { dg-warning "18: message" "" { target *-*-* } 12 } */ | |
31 /* { dg-begin-multiline-output "" } | |
32 __emit_warning ("message"); | |
33 ~~~~~~~~~~~~~~~^~~~~~~~~~~ | |
34 { dg-end-multiline-output "" } */ |