public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266
@ 2020-09-18 17:11 seurer at gcc dot gnu.org
2020-09-18 20:14 ` [Bug other/97117] " ppalka at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: seurer at gcc dot gnu.org @ 2020-09-18 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97117
Bug ID: 97117
Summary: [11 regression] location-overflow-test-1.c FAILs after
r11-3266
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: seurer at gcc dot gnu.org
Target Milestone: ---
g:4839de55e2c98619f4919254abb87e2f393aaead, r11-3266
commit 4839de55e2c98619f4919254abb87e2f393aaead (HEAD)
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Sep 17 14:27:22 2020 -0400
c-family: Macro support in -Wmisleading-indentation [PR80076]
FAIL: gcc.dg/plugin/location-overflow-test-1.c
-fplugin=./location_overflow_plugin.so adding '-flarge-source-files' (test for
warnings, line 16)
Executing on host: /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/plugin/location-overflow-test-1.c
-fdiagnostics-plain-output -fplugin=./location_overflow_plugin.so
-Wmisleading-indentation -Wall
-fplugin-arg-location_overflow_plugin-value=0x60000001 -S -o
location-overflow-test-1.s (timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/plugin/location-overflow-test-1.c
-fdiagnostics-plain-output -fplugin=./location_overflow_plugin.so
-Wmisleading-indentation -Wall
-fplugin-arg-location_overflow_plugin-value=0x60000001 -S -o
location-overflow-test-1.s^M
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/plugin/location-overflow-test-1.c:8:
error: unknown type name 'unknown_type'^M
compiler exited with status 1
PASS: gcc.dg/plugin/location-overflow-test-1.c
-fplugin=./location_overflow_plugin.so (test for errors, line 8)
FAIL: gcc.dg/plugin/location-overflow-test-1.c
-fplugin=./location_overflow_plugin.so adding '-flarge-source-files' (test for
warnings, line 16)
PASS: gcc.dg/plugin/location-overflow-test-1.c
-fplugin=./location_overflow_plugin.so (test for bogus messages, line 26)
PASS: gcc.dg/plugin/location-overflow-test-1.c
-fplugin=./location_overflow_plugin.so (test for excess errors)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug other/97117] [11 regression] location-overflow-test-1.c FAILs after r11-3266
2020-09-18 17:11 [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266 seurer at gcc dot gnu.org
@ 2020-09-18 20:14 ` ppalka at gcc dot gnu.org
2020-09-21 6:45 ` [Bug testsuite/97117] " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-09-18 20:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97117
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Last reconfirmed| |2020-09-18
Ever confirmed|0 |1
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Thanks, I somehow missed this failure during testing...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/97117] [11 regression] location-overflow-test-1.c FAILs after r11-3266
2020-09-18 17:11 [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266 seurer at gcc dot gnu.org
2020-09-18 20:14 ` [Bug other/97117] " ppalka at gcc dot gnu.org
@ 2020-09-21 6:45 ` rguenth at gcc dot gnu.org
2020-10-12 11:50 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-21 6:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97117
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|other |testsuite
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/97117] [11 regression] location-overflow-test-1.c FAILs after r11-3266
2020-09-18 17:11 [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266 seurer at gcc dot gnu.org
2020-09-18 20:14 ` [Bug other/97117] " ppalka at gcc dot gnu.org
2020-09-21 6:45 ` [Bug testsuite/97117] " rguenth at gcc dot gnu.org
@ 2020-10-12 11:50 ` rguenth at gcc dot gnu.org
2020-11-09 16:42 ` cvs-commit at gcc dot gnu.org
2020-11-09 16:43 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97117
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/97117] [11 regression] location-overflow-test-1.c FAILs after r11-3266
2020-09-18 17:11 [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266 seurer at gcc dot gnu.org
` (2 preceding siblings ...)
2020-10-12 11:50 ` rguenth at gcc dot gnu.org
@ 2020-11-09 16:42 ` cvs-commit at gcc dot gnu.org
2020-11-09 16:43 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-09 16:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97117
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:4394b1ce7731b04446555e034163b14b4f4a7f8d
commit r11-4848-g4394b1ce7731b04446555e034163b14b4f4a7f8d
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Nov 9 11:09:42 2020 -0500
c-family: Fix regression in location-overflow-test-1.c [PR97117]
The r11-3266 patch that added macro support to -Wmisleading-indentation
accidentally suppressed the column-tracking diagnostic in
get_visual_column in some cases, e.g. in the location-overflow-test-1.c
testcase.
More generally, when all three tokens are on the same line and we've run
out of locations with column info, then their location_t values will be
equal, and we exit early from should_warn_for_misleading_indentation due
to the new check
/* Give up if the loci are not all distinct. */
if (guard_loc == body_loc || body_loc == next_stmt_loc)
return false;
before we ever call get_visual_column.
[ This new check is needed to detect and give up on analyzing code
fragments where exactly two out of the three tokens come from the same
macro expansion, e.g.
#define MACRO \
if (a) \
foo ();
MACRO; bar ();
Here, guard_loc and body_loc will be equal and point to the macro
expansion point (and next_stmt_loc will point to 'bar'). The heuristics
that the warning uses are not really valid in scenarios like these. ]
In order to restore the column-tracking diagnostic, this patch moves the
the diagnostic code out from get_visual_column to earlier in
should_warn_for_misleading_indentation. Moreover, it tests the three
locations for a zero column all at once, which I suppose should make us
issue the diagnostic more consistently.
gcc/c-family/ChangeLog:
PR testsuite/97117
* c-indentation.c (get_visual_column): Remove location_t
parameter. Move the column-tracking diagnostic code from here
to ...
(should_warn_for_misleading_indentation): ... here, before the
early exit for when the loci are not all distinct. Don't pass a
location_t argument to get_visual_column.
(assert_get_visual_column_succeeds): Don't pass a location_t
argument to get_visual_column.
(assert_get_visual_column_fails): Likewise.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/97117] [11 regression] location-overflow-test-1.c FAILs after r11-3266
2020-09-18 17:11 [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266 seurer at gcc dot gnu.org
` (3 preceding siblings ...)
2020-11-09 16:42 ` cvs-commit at gcc dot gnu.org
@ 2020-11-09 16:43 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-11-09 16:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97117
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-11-09 16:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 17:11 [Bug other/97117] New: [11 regression] location-overflow-test-1.c FAILs after r11-3266 seurer at gcc dot gnu.org
2020-09-18 20:14 ` [Bug other/97117] " ppalka at gcc dot gnu.org
2020-09-21 6:45 ` [Bug testsuite/97117] " rguenth at gcc dot gnu.org
2020-10-12 11:50 ` rguenth at gcc dot gnu.org
2020-11-09 16:42 ` cvs-commit at gcc dot gnu.org
2020-11-09 16:43 ` ppalka at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).