public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234
@ 2021-03-01 17:03 gscfq@t-online.de
2021-03-02 7:37 ` [Bug c/99323] " rguenth at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: gscfq@t-online.de @ 2021-03-01 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Bug ID: 99323
Summary: [9/10/11 Regression] ICE in add_hint, at
diagnostic-show-locus.c:2234
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
With testfile gcc.c-torture/compile/limits-externdecl.c
and options -Wall -no-integrated-cpp, started with r8 :
$ gcc-11-20210228 -c limits-externdecl.c -no-integrated-cpp
$
$ gcc-11-20210228 -c limits-externdecl.c -Wall -no-integrated-cpp
limits-externdecl.c:55:26: warning: missing braces around initializer
[-Wmissing-braces]
55 | REFERENCE references[] = {
| ^
56 | LIM5 (X)
limits-externdecl.c:58:1: internal compiler error: in add_hint, at
diagnostic-show-locus.c:2234
58 | };
| ^
0x15769cf add_hint
../../gcc/diagnostic-show-locus.c:2233
0x15769cf print_trailing_fixits
../../gcc/diagnostic-show-locus.c:2316
0x15769cf print_line
../../gcc/diagnostic-show-locus.c:2555
0x15769cf diagnostic_show_locus(diagnostic_context*, rich_location*,
diagnostic_t)
../../gcc/diagnostic-show-locus.c:2637
0x6e9ef5 c_diagnostic_finalizer
../../gcc/c-family/c-opts.c:175
0x157029b diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc/diagnostic.c:1251
0x157091e diagnostic_impl
../../gcc/diagnostic.c:1406
0x1572272 warning_at(rich_location*, int, char const*, ...)
../../gcc/diagnostic.c:1558
0x662913 pop_init_level(unsigned int, int, obstack*, unsigned int)
../../gcc/c/c-typeck.c:8839
0x684a0a c_parser_braced_init
../../gcc/c/c-parser.c:5280
0x686d1e c_parser_initializer
../../gcc/c/c-parser.c:5201
0x694e3a c_parser_declaration_or_fndef
../../gcc/c/c-parser.c:2276
0x69c717 c_parser_external_declaration
../../gcc/c/c-parser.c:1777
0x69d239 c_parser_translation_unit
../../gcc/c/c-parser.c:1650
0x69d239 c_parse_file()
../../gcc/c/c-parser.c:21984
0x6ed0a2 c_common_parse_file()
../../gcc/c-family/c-opts.c:1218
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
@ 2021-03-02 7:37 ` rguenth at gcc dot gnu.org
2021-03-02 9:51 ` [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e marxin at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-02 7:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |9.4
CC| |dmalcolm at gcc dot gnu.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
2021-03-02 7:37 ` [Bug c/99323] " rguenth at gcc dot gnu.org
@ 2021-03-02 9:51 ` marxin at gcc dot gnu.org
2021-03-02 10:12 ` marxin at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-02 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Summary|[9/10/11 Regression] ICE in |[9/10/11 Regression] ICE in
|add_hint, at |add_hint, at
|diagnostic-show-locus.c:223 |diagnostic-show-locus.c:223
|4 |4 since
| |r8-379-gd1b5f5cc3cfd148e
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2021-03-02
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r8-379-gd1b5f5cc3cfd148e.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
2021-03-02 7:37 ` [Bug c/99323] " rguenth at gcc dot gnu.org
2021-03-02 9:51 ` [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e marxin at gcc dot gnu.org
@ 2021-03-02 10:12 ` marxin at gcc dot gnu.org
2021-03-02 14:31 ` dmalcolm at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-02 10:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Slightly reduced test-case:
$ cat x.c
typedef struct {
} REFERENCE;
#define LIM2() LIM1()
#define LIM3() LIM2() LIM2() LIM2() LIM2() LIM2() LIM2()
#define LIM4()
\
LIM3() LIM3() LIM3() LIM3() LIM3() LIM3() LIM3() LIM3() LIM3() LIM3()
#define LIM5()
\
LIM4() LIM4() LIM4() LIM4() LIM4() LIM4() LIM4() LIM4() LIM4() LIM4()
#define LIM1() DEF(),
REFERENCE references[] = {LIM5()}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (2 preceding siblings ...)
2021-03-02 10:12 ` marxin at gcc dot gnu.org
@ 2021-03-02 14:31 ` dmalcolm at gcc dot gnu.org
2021-03-02 20:47 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2021-03-02 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |dmalcolm at gcc dot gnu.org
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Mine
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (3 preceding siblings ...)
2021-03-02 14:31 ` dmalcolm at gcc dot gnu.org
@ 2021-03-02 20:47 ` cvs-commit at gcc dot gnu.org
2021-03-02 20:50 ` [Bug c/99323] [9/10 " dmalcolm at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-02 20:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:41fbacdd10305654b1d10f887fa3f4677f9b8f34
commit r11-7461-g41fbacdd10305654b1d10f887fa3f4677f9b8f34
Author: David Malcolm <dmalcolm@redhat.com>
Date: Tue Mar 2 15:46:06 2021 -0500
diagnostics: fix ICE on fix-it hints on very long lines [PR99323]
PR c/99323 describes an ICE due to a failed assertion deep inside the
fix-it printing machinery, where the fix-it hints on one line have not
been properly sorted in layout's constructor.
The underlying issue occurs when multiple fix-it hints affect a line
wider that LINE_MAP_MAX_COLUMN_NUMBER, where the location_t values for
characters after that threshold fall back to having column zero.
It's not meaningful to try to handle fix-it hints without column
information, so this patch rejects them as they are added to the
rich_location, falling back to the "no fix-it hints on this diagnostic"
case, fixing the crash.
gcc/ChangeLog:
PR c/99323
* diagnostic-show-locus.c
(selftest::test_one_liner_many_fixits_2): Fix accidental usage of
column 0.
gcc/testsuite/ChangeLog:
PR c/99323
* gcc.dg/pr99323-1.c: New test.
* gcc.dg/pr99323-2.c: New test.
libcpp/ChangeLog:
PR c/99323
* line-map.c (rich_location::maybe_add_fixit): Reject fix-it hints
at column 0.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (4 preceding siblings ...)
2021-03-02 20:47 ` cvs-commit at gcc dot gnu.org
@ 2021-03-02 20:50 ` dmalcolm at gcc dot gnu.org
2021-04-30 8:09 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2021-03-02 20:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE in |[9/10 Regression] ICE in
|add_hint, at |add_hint, at
|diagnostic-show-locus.c:223 |diagnostic-show-locus.c:223
|4 since |4 since
|r8-379-gd1b5f5cc3cfd148e |r8-379-gd1b5f5cc3cfd148e
--- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed on trunk for gcc 11 by above commit.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (5 preceding siblings ...)
2021-03-02 20:50 ` [Bug c/99323] [9/10 " dmalcolm at gcc dot gnu.org
@ 2021-04-30 8:09 ` rguenth at gcc dot gnu.org
2021-06-01 8:19 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-30 8:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [9/10 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (6 preceding siblings ...)
2021-04-30 8:09 ` rguenth at gcc dot gnu.org
@ 2021-06-01 8:19 ` rguenth at gcc dot gnu.org
2022-05-27 9:44 ` [Bug c/99323] [10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [10 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (7 preceding siblings ...)
2021-06-01 8:19 ` rguenth at gcc dot gnu.org
@ 2022-05-27 9:44 ` rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 9:29 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [10 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (8 preceding siblings ...)
2022-05-27 9:44 ` [Bug c/99323] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 9:29 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/99323] [10 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
` (9 preceding siblings ...)
2022-06-28 10:43 ` jakub at gcc dot gnu.org
@ 2023-07-07 9:29 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 9:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99323
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.0
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Known to fail| |10.5.0
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-07-07 9:29 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 17:03 [Bug c/99323] New: [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 gscfq@t-online.de
2021-03-02 7:37 ` [Bug c/99323] " rguenth at gcc dot gnu.org
2021-03-02 9:51 ` [Bug c/99323] [9/10/11 Regression] ICE in add_hint, at diagnostic-show-locus.c:2234 since r8-379-gd1b5f5cc3cfd148e marxin at gcc dot gnu.org
2021-03-02 10:12 ` marxin at gcc dot gnu.org
2021-03-02 14:31 ` dmalcolm at gcc dot gnu.org
2021-03-02 20:47 ` cvs-commit at gcc dot gnu.org
2021-03-02 20:50 ` [Bug c/99323] [9/10 " dmalcolm at gcc dot gnu.org
2021-04-30 8:09 ` rguenth at gcc dot gnu.org
2021-06-01 8:19 ` rguenth at gcc dot gnu.org
2022-05-27 9:44 ` [Bug c/99323] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07 9:29 ` rguenth 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).