public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108504] New: [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675
@ 2023-01-23 17:50 gscfq@t-online.de
2023-01-23 20:52 ` [Bug c++/108504] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2023-01-23 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108504
Bug ID: 108504
Summary: [13 Regression] ICE in cp_lexer_handle_early_pragma,
at cp/parser.cc:675
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20220703 and 20220710 :
$ cat z1.cc
"1"
#pragma omp target
$ g++-13-20230122 -c z1.cc -fopenmp
z1.cc:2:9: internal compiler error: in cp_lexer_handle_early_pragma, at
cp/parser.cc:675
2 | #pragma omp target
| ^~~
0x90d288 cp_lexer_handle_early_pragma
../../gcc/cp/parser.cc:675
0x90d288 cp_lexer_new_main
../../gcc/cp/parser.cc:734
0x90d288 c_parse_file()
../../gcc/cp/parser.cc:49398
0x9f4e01 c_common_parse_file()
../../gcc/c-family/c-opts.cc:1248
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/108504] [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675
2023-01-23 17:50 [Bug c++/108504] New: [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675 gscfq@t-online.de
@ 2023-01-23 20:52 ` pinskia at gcc dot gnu.org
2023-01-24 21:23 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-23 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108504
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords|openmp |
Last reconfirmed| |2023-01-23
Target Milestone|--- |13.0
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Most likely one of these two patches:
r13-1605-gcb7b01db7a1979
r13-1544-ge46f4d7430c521
The first one is a fix for the second one ...
here is a testcase without openmp:
```
""
#pragma GCC diagnostic push
```
Confirmed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/108504] [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675
2023-01-23 17:50 [Bug c++/108504] New: [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675 gscfq@t-online.de
2023-01-23 20:52 ` [Bug c++/108504] " pinskia at gcc dot gnu.org
@ 2023-01-24 21:23 ` jason at gcc dot gnu.org
2023-01-24 22:12 ` cvs-commit at gcc dot gnu.org
2023-01-24 22:12 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2023-01-24 21:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108504
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
CC| |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/108504] [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675
2023-01-23 17:50 [Bug c++/108504] New: [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675 gscfq@t-online.de
2023-01-23 20:52 ` [Bug c++/108504] " pinskia at gcc dot gnu.org
2023-01-24 21:23 ` jason at gcc dot gnu.org
@ 2023-01-24 22:12 ` cvs-commit at gcc dot gnu.org
2023-01-24 22:12 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-24 22:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108504
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:327d45c57ebd2655a7599df0f01b8b5e2f82eda7
commit r13-5335-g327d45c57ebd2655a7599df0f01b8b5e2f82eda7
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 24 16:26:50 2023 -0500
c++: "" #pragma at BOF [PR108504]
Since r11-2095 we pass flags to cp_lexer_get_preprocessor_token, and
cp_lexer_new_main passes C_LEX_STRING_NO_JOIN when lexing most of the
translation unit, but doesn't do that for the very first token; as a
result, if the first token is a string literal, we try to join strings and
get confused if that encounters a pragma.
PR c++/108504
gcc/cp/ChangeLog:
* parser.cc (cp_lexer_new_main): Pass C_LEX_STRING_NO_JOIN for
first
token, too.
gcc/testsuite/ChangeLog:
* g++.dg/ext/pragma1.C: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/108504] [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675
2023-01-23 17:50 [Bug c++/108504] New: [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675 gscfq@t-online.de
` (2 preceding siblings ...)
2023-01-24 22:12 ` cvs-commit at gcc dot gnu.org
@ 2023-01-24 22:12 ` jason at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2023-01-24 22:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108504
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-24 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 17:50 [Bug c++/108504] New: [13 Regression] ICE in cp_lexer_handle_early_pragma, at cp/parser.cc:675 gscfq@t-online.de
2023-01-23 20:52 ` [Bug c++/108504] " pinskia at gcc dot gnu.org
2023-01-24 21:23 ` jason at gcc dot gnu.org
2023-01-24 22:12 ` cvs-commit at gcc dot gnu.org
2023-01-24 22:12 ` jason 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).