public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc)
@ 2020-10-26 8:37 asolokha at gmx dot com
2020-10-26 12:36 ` [Bug preprocessor/97577] " rguenth at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: asolokha at gmx dot com @ 2020-10-26 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Bug ID: 97577
Summary: [11 Regression] ICE: Segmentation fault (in
get_location_from_adhoc_loc)
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc-11.0.0-alpha20201025 snapshot (g:308e40331f9d2820f8286769b5fc764671187364)
ICEs when compiling the following testcase, reduced from
test/Preprocessor/annotate_in_macro_arg.c from the clang 10.0.1 test suite:
#define M1()
M1(
#if M1()
#endif
#pragma pack()
% MALLOC_PERTURB_=1 MALLOC_CHECK_=3 gcc-11.0.0 -c ifhvkm83.c
ifhvkm83.c:5:9: error: #if with no expression
5 | #if M1()
| ^
ifhvkm83.c:7:9: internal compiler error: Segmentation fault
7 | #pragma pack()
| ^~~~
0xdbaf3f crash_signal
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/toplev.c:330
0x192e151 get_location_from_adhoc_loc(line_maps const*, unsigned int)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/line-map.c:257
0x192e151 linemap_resolve_location(line_maps*, unsigned int,
location_resolution_kind, line_map_ordinary const**)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/line-map.c:1540
0x18e8933 diagnostic_report_current_module(diagnostic_context*, unsigned int)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/diagnostic.c:683
0xe15071 diagnostic_report_current_function(diagnostic_context*,
diagnostic_info*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-diagnostic.c:39
0xe150d0 default_tree_diagnostic_starter
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/tree-diagnostic.c:48
0x18e6a27 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/diagnostic.c:1206
0x885aaa c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level,
cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1])
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c-family/c-common.c:6364
0x191df49 cpp_diagnostic_at
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/errors.c:42
0x191df49 cpp_diagnostic
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/errors.c:75
0x191e06e cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/errors.c:89
0x1931f58 collect_args
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:1267
0x1931f58 funlike_invocation_p
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:1326
0x1931f58 enter_macro_context
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:1401
0x19326e2 cpp_get_token_1
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/libcpp/macro.c:2890
0x89fe80 c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c-family/c-lex.c:457
0x81d67a c_lex_one_token
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c/c-parser.c:279
0x85005a c_parser_peek_token(c_parser*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c/c-parser.c:483
0x85005a c_parse_file()
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c/c-parser.c:21819
0x8abe2d c_common_parse_file()
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201025/work/gcc-11-20201025/gcc/c-family/c-opts.c:1188
I've failed to reproduce it w/ valgrind so far.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc)
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
@ 2020-10-26 12:36 ` rguenth at gcc dot gnu.org
2020-11-21 5:15 ` asolokha at gmx dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-26 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc)
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
2020-10-26 12:36 ` [Bug preprocessor/97577] " rguenth at gcc dot gnu.org
@ 2020-11-21 5:15 ` asolokha at gmx dot com
2020-11-21 15:04 ` [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128 hjl.tools at gmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: asolokha at gmx dot com @ 2020-11-21 5:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
--- Comment #1 from Arseny Solokha <asolokha at gmx dot com> ---
…or, sometimes, it ICEs w/ "internal compiler error: in
linemap_macro_map_lookup, at libcpp/line-map.c:1001".
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
2020-10-26 12:36 ` [Bug preprocessor/97577] " rguenth at gcc dot gnu.org
2020-11-21 5:15 ` asolokha at gmx dot com
@ 2020-11-21 15:04 ` hjl.tools at gmail dot com
2021-01-14 9:31 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2020-11-21 15:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Summary|[11 Regression] ICE: |[11 Regression] ICE:
|Segmentation fault (in |Segmentation fault (in
|get_location_from_adhoc_loc |get_location_from_adhoc_loc
|) |) by r11-4128
Last reconfirmed| |2020-11-21
CC| |nathan at acm dot org
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
It is caused by r11-4128.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (2 preceding siblings ...)
2020-11-21 15:04 ` [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128 hjl.tools at gmail dot com
@ 2021-01-14 9:31 ` rguenth at gcc dot gnu.org
2021-04-27 11:39 ` [Bug preprocessor/97577] [11/12 " jakub at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11/12 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (3 preceding siblings ...)
2021-01-14 9:31 ` rguenth at gcc dot gnu.org
@ 2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.0 |11.2
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.1 has been released, retargeting bugs to GCC 11.2.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11/12 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (4 preceding siblings ...)
2021-04-27 11:39 ` [Bug preprocessor/97577] [11/12 " jakub at gcc dot gnu.org
@ 2021-05-04 12:32 ` rguenth at gcc dot gnu.org
2021-07-05 10:23 ` asolokha at gmx dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11/12 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (5 preceding siblings ...)
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
@ 2021-07-05 10:23 ` asolokha at gmx dot com
2021-07-28 7:05 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: asolokha at gmx dot com @ 2021-07-05 10:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
--- Comment #4 from Arseny Solokha <asolokha at gmx dot com> ---
% MALLOC_PERTURB_=1 MALLOC_CHECK_=3 gcc-12.0.0 -c tt.c
tt.c:5:9: error: #if with no expression
5 | #if M1()
| ^
tt.c:7:9: internal compiler error: Segmentation fault
7 | #pragma pack()
| ^~~~
(in get_data_from_adhoc_loc).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11/12 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (6 preceding siblings ...)
2021-07-05 10:23 ` asolokha at gmx dot com
@ 2021-07-28 7:05 ` rguenth at gcc dot gnu.org
2022-04-21 7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:03 ` [Bug preprocessor/97577] [11/12/13/14 " jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28 7:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.2 |11.3
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11/12 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (7 preceding siblings ...)
2021-07-28 7:05 ` rguenth at gcc dot gnu.org
@ 2022-04-21 7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:03 ` [Bug preprocessor/97577] [11/12/13/14 " jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21 7:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.3 |11.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug preprocessor/97577] [11/12/13/14 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
` (8 preceding siblings ...)
2022-04-21 7:48 ` rguenth at gcc dot gnu.org
@ 2023-05-29 10:03 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97577
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.4 |11.5
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-05-29 10:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 8:37 [Bug preprocessor/97577] New: [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) asolokha at gmx dot com
2020-10-26 12:36 ` [Bug preprocessor/97577] " rguenth at gcc dot gnu.org
2020-11-21 5:15 ` asolokha at gmx dot com
2020-11-21 15:04 ` [Bug preprocessor/97577] [11 Regression] ICE: Segmentation fault (in get_location_from_adhoc_loc) by r11-4128 hjl.tools at gmail dot com
2021-01-14 9:31 ` rguenth at gcc dot gnu.org
2021-04-27 11:39 ` [Bug preprocessor/97577] [11/12 " jakub at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
2021-07-05 10:23 ` asolokha at gmx dot com
2021-07-28 7:05 ` rguenth at gcc dot gnu.org
2022-04-21 7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:03 ` [Bug preprocessor/97577] [11/12/13/14 " jakub 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).