In theory, the diagnostics subsystem can print context information on code inlining when diagnostics are emitted by the middle-end, describing the chain of inlined callsites that led to a particular warning, but PR tree-optimization/83336 describes various issues with this. An underlying issue is that we have very little automated testing for this code: gcc.dg/tm/pr52141.c has a test, but in general, prune.exp filters out the various "inlined from" lines. The following patch adds test coverage for it for C and C++ via a new testsuite plugin, which emits a warning from the middle-end; the test cases use dg-regexp to verify that the "inlined from" lines are emitted correctly, with the correct function names and source locations. Doing so requires a change to prune.exp: the dg-regexp lines have to be handled *before* the "inlined from" lines are stripped. gcc/testsuite/ChangeLog: PR tree-optimization/83336 * g++.dg/cpp0x/missing-initializer_list-include.C: Update for changes to prune.exp's handling of dg-regexp. * g++.dg/plugin/diagnostic-test-inlining-1.C: New test case. * g++.dg/plugin/plugin.exp (plugin_test_list): Add it, via gcc.dg's plugin/diagnostic_plugin_test_inlining.c. * gcc.dg/plugin/diagnostic-test-inlining-1.c: New test case. * gcc.dg/plugin/diagnostic-test-inlining-2.c: Likewise. * gcc.dg/plugin/diagnostic-test-inlining-3.c: Likewise. * gcc.dg/plugin/diagnostic-test-inlining-4.c: Likewise. * gcc.dg/plugin/diagnostic_plugin_test_inlining.c: New test plugin. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add them. * lib/prune.exp (prune_gcc_output): Move call to handle-dg-regexps to before the various text stripping regsup invocations, in particular, to before the stripping of "inlined from". From-SVN: r255786
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
asan-dg.exp | Loading commit data... | |
atomic-dg.exp | Loading commit data... | |
brig-dg.exp | Loading commit data... | |
brig.exp | Loading commit data... | |
c-compat.exp | Loading commit data... | |
c-torture.exp | Loading commit data... | |
clearcap.exp | Loading commit data... | |
compat.exp | Loading commit data... | |
copy-file.exp | Loading commit data... | |
dejapatches.exp | Loading commit data... | |
dg-pch.exp | Loading commit data... | |
file-format.exp | Loading commit data... | |
fortran-modules.exp | Loading commit data... | |
fortran-torture.exp | Loading commit data... | |
g++-dg.exp | Loading commit data... | |
g++.exp | Loading commit data... | |
gcc-defs.exp | Loading commit data... | |
gcc-dg.exp | Loading commit data... | |
gcc-gdb-test.exp | Loading commit data... | |
gcc-simulate-thread.exp | Loading commit data... | |
gcc.exp | Loading commit data... | |
gcov.exp | Loading commit data... | |
gfortran-dg.exp | Loading commit data... | |
gfortran.exp | Loading commit data... | |
gnat-dg.exp | Loading commit data... | |
gnat.exp | Loading commit data... | |
go-dg.exp | Loading commit data... | |
go-torture.exp | Loading commit data... | |
go.exp | Loading commit data... | |
lto.exp | Loading commit data... | |
mike-g++.exp | Loading commit data... | |
mike-gcc.exp | Loading commit data... | |
mpx-dg.exp | Loading commit data... | |
multiline.exp | Loading commit data... | |
obj-c++-dg.exp | Loading commit data... | |
obj-c++.exp | Loading commit data... | |
objc-dg.exp | Loading commit data... | |
objc-torture.exp | Loading commit data... | |
objc.exp | Loading commit data... | |
options.exp | Loading commit data... | |
plugin-support.exp | Loading commit data... | |
profopt.exp | Loading commit data... | |
prune.exp | Loading commit data... | |
scanasm.exp | Loading commit data... | |
scandump.exp | Loading commit data... | |
scanipa.exp | Loading commit data... | |
scanlang.exp | Loading commit data... | |
scanrtl.exp | Loading commit data... | |
scantree.exp | Loading commit data... | |
target-libpath.exp | Loading commit data... | |
target-supports-dg.exp | Loading commit data... | |
target-supports.exp | Loading commit data... | |
target-utils.exp | Loading commit data... | |
timeout-dg.exp | Loading commit data... | |
timeout.exp | Loading commit data... | |
torture-options.exp | Loading commit data... | |
tsan-dg.exp | Loading commit data... | |
ubsan-dg.exp | Loading commit data... | |
wrapper.exp | Loading commit data... |