* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-09 0:14 ` gcc at abeckmann dot de
2011-03-21 14:46 ` zsojka at seznam dot cz
` (8 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: gcc at abeckmann dot de @ 2010-12-09 0:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Andreas Beckmann <gcc at abeckmann dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |3.3.6, 4.6.0
Known to fail|4.4.0, 4.5.0 |4.2.4, 4.3.6, 4.4.6, 4.5.2
--- Comment #7 from Andreas Beckmann <gcc at abeckmann dot de> 2010-12-09 00:14:11 UTC ---
I just checked again and this problem seems to be fixed in trunk now.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
2010-12-09 0:14 ` [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342 gcc at abeckmann dot de
@ 2011-03-21 14:46 ` zsojka at seznam dot cz
2011-09-25 16:16 ` paolo.carlini at oracle dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: zsojka at seznam dot cz @ 2011-03-21 14:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
--- Comment #8 from Zdenek Sojka <zsojka at seznam dot cz> 2011-03-21 14:34:14 UTC ---
(In reply to comment #7)
> I just checked again and this problem seems to be fixed in trunk now.
It still crashes for me (with the testcase from comment #0):
$ gcc-4.7.0-pre9999 xxx.C
xxx.C:5:1: error: types may not be defined in template arguments
xxx.C:6:4: error: ISO C++ forbids declaration of ‘f’ with no type
[-fpermissive]
xxx.C:6:6: error: expected ‘}’ at end of input
xxx.C:6:6: error: expected template-argument at end of input
xxx.C:6:6: error: expected ‘>’ at end of input
xxx.C:6:6: error: expected ‘::’ at end of input
xxx.C:6:6: error: expected unqualified-id at end of input
xxx.C:6:6: error: expected ‘;’ at end of input
xxx.C:6:6: error: expected ‘}’ at end of input
xxx.C:6:6: internal compiler error: in cp_lexer_new_from_tokens, at
cp/parser.c:395
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
2010-12-09 0:14 ` [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342 gcc at abeckmann dot de
2011-03-21 14:46 ` zsojka at seznam dot cz
@ 2011-09-25 16:16 ` paolo.carlini at oracle dot com
2021-12-29 0:24 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-25 16:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-25 16:08:15 UTC ---
*** Bug 46858 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-09-25 16:16 ` paolo.carlini at oracle dot com
@ 2021-12-29 0:24 ` pinskia at gcc dot gnu.org
2021-12-29 0:24 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29 0:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |haoxintu at gmail dot com
--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 95927 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2021-12-29 0:24 ` pinskia at gcc dot gnu.org
@ 2021-12-29 0:24 ` pinskia at gcc dot gnu.org
2021-12-29 0:25 ` [Bug c++/39751] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29 0:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |v.barinov at samsung dot com
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 94153 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] [9/10/11/12 Regression] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2021-12-29 0:24 ` pinskia at gcc dot gnu.org
@ 2021-12-29 0:25 ` pinskia at gcc dot gnu.org
2022-01-21 13:56 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29 0:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |9.5
Severity|minor |trivial
Summary|ICE in |[9/10/11/12 Regression] ICE
|cp_lexer_new_from_tokens, |in
|at cp/parser.c:342 |cp_lexer_new_from_tokens,
| |at cp/parser.c:342
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] [9/10/11/12 Regression] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-12-29 0:25 ` [Bug c++/39751] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-21 13:56 ` rguenth at gcc dot gnu.org
2022-02-27 0:01 ` roger at nextmovesoftware dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-21 13:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] [9/10/11/12 Regression] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2022-01-21 13:56 ` rguenth at gcc dot gnu.org
@ 2022-02-27 0:01 ` roger at nextmovesoftware dot com
2022-03-10 7:33 ` cvs-commit at gcc dot gnu.org
2022-03-10 22:44 ` roger at nextmovesoftware dot com
9 siblings, 0 replies; 16+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-02-27 0:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |roger at nextmovesoftware dot com
Assignee|unassigned at gcc dot gnu.org |roger at nextmovesoftware dot com
Status|NEW |ASSIGNED
--- Comment #14 from Roger Sayle <roger at nextmovesoftware dot com> ---
Patch proposed.
https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590951.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] [9/10/11/12 Regression] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2022-02-27 0:01 ` roger at nextmovesoftware dot com
@ 2022-03-10 7:33 ` cvs-commit at gcc dot gnu.org
2022-03-10 22:44 ` roger at nextmovesoftware dot com
9 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-10 7:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:2185c9734ad977b88c519a4579187a91b3f71edd
commit r12-7573-g2185c9734ad977b88c519a4579187a91b3f71edd
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Thu Mar 10 07:32:06 2022 +0000
PR c++/39751: ICE-on-invalid parsing regression.
This is a fix for PR c++/39751 which is an ICE-on-invalid regression in
the C++ parser after encountering the end of file. The one line change
is to check that the tokens cached in DECL_PENDING_INLINE_INFO haven't
been purged before processing them in cp_parser_late_parsing_for_member.
2022-03-10 Roger Sayle <roger@nextmovesoftware.com>
gcc/cp/ChangeLog
PR c++/39751
* parser.cc (cp_parser_late_parsing_for_member): Confirm the token
stream hasn't been purged before processing DECL_PENDING_INLINE.
gcc/testsuite/ChangeLog
PR c++/39751
* g++.dg/parse/pr39751.C: New test case.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] [9/10/11/12 Regression] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
[not found] <bug-39751-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2022-03-10 7:33 ` cvs-commit at gcc dot gnu.org
@ 2022-03-10 22:44 ` roger at nextmovesoftware dot com
9 siblings, 0 replies; 16+ messages in thread
From: roger at nextmovesoftware dot com @ 2022-03-10 22:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|9.5 |12.0
Resolution|--- |FIXED
--- Comment #16 from Roger Sayle <roger at nextmovesoftware dot com> ---
This should now be fixed on mainline.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
2009-04-13 14:43 [Bug c++/39751] New: " gcc at abeckmann dot de
@ 2009-04-13 14:47 ` paolo dot carlini at oracle dot com
2009-04-13 15:05 ` hjl dot tools at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-04-13 14:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from paolo dot carlini at oracle dot com 2009-04-13 14:47 -------
Are you *sure* this is a regression? Did you compare to 4.5.0 a 4.4.0 built
with checking *enabled*?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
2009-04-13 14:43 [Bug c++/39751] New: " gcc at abeckmann dot de
2009-04-13 14:47 ` [Bug c++/39751] " paolo dot carlini at oracle dot com
@ 2009-04-13 15:05 ` hjl dot tools at gmail dot com
2009-04-13 15:06 ` pinskia at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-04-13 15:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hjl dot tools at gmail dot com 2009-04-13 15:04 -------
(In reply to comment #1)
> Are you *sure* this is a regression? Did you compare to 4.5.0 a 4.4.0 built
> with checking *enabled*?
>
FWIW, gcc 4.4.0 doesn't ICE when checking isn't disabled. But this testcase
has been failing since gcc 4.3.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
2009-04-13 14:43 [Bug c++/39751] New: " gcc at abeckmann dot de
2009-04-13 14:47 ` [Bug c++/39751] " paolo dot carlini at oracle dot com
2009-04-13 15:05 ` hjl dot tools at gmail dot com
@ 2009-04-13 15:06 ` pinskia at gmail dot com
2009-04-13 15:10 ` paolo dot carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: pinskia at gmail dot com @ 2009-04-13 15:06 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2908 bytes --]
------- Comment #3 from pinskia at gmail dot com 2009-04-13 15:06 -------
Subject: Re: New: ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
Sent from my iPhone
On Apr 13, 2009, at 7:43 AM, "gcc at abeckmann dot de"
<gcc-bugzilla@gcc.gnu.org
> wrote:
> This is a 4.5.0 regression on invalid code:
>
> ========== 8< ==========
> template < typename >
> struct A
> {
> A < struct
> {
> f () :
> ========== >8 ==========
>
> ---------- 4.5.0 ----------
> $ x86_64-linux-gnu-g++-trunk -v -c ice-cp_parser_c-342.ii
>
> Using built-in specs.
> Target: x86_64-unknown-linux-gnu
> Configured with: ../gcc-trunk/configure
> --prefix=/opt/software/gcc-x86_64/gcc-trunk --program-suffix=-trunk
> --enable-languages=c,c++
> Thread model: posix
> gcc version 4.5.0 20090410 (experimental) (GCC)
> COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic'
>
> /opt/software/gcc-x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-
> gnu/4.5.0/cc1plus
> -fpreprocessed ice-cp_parser_c-342.ii -quiet -dumpbase ice-
> cp_parser_c-342.ii
> -mtune=generic -auxbase ice-cp_parser_c-342 -version -o /tmp/
> ccqQZWYs.s
> GNU C++ (GCC) version 4.5.0 20090412 (experimental) (x86_64-unknown-
> linux-gnu)
> compiled by GNU C version 4.5.0 20090410 (experimental), GMP
> version
> 4.2.2, MPFR version 2.3.1.
> GGC heuristics: --param ggc-min-expand=30 --param ggc-min-
> heapsize=4096
> Compiler executable checksum: b13346d60276f3352c4b7dd22e3889d7
> ice-cp_parser_c-342.ii:6: error: ISO C++ forbids declaration of
> âfâ with no
> type
> ice-cp_parser_c-342.ii:6: error: expected â}â at end of input
> ice-cp_parser_c-342.ii:6: error: expected template-argument at end
> of input
> ice-cp_parser_c-342.ii:6: error: expected â>â at end of input
> ice-cp_parser_c-342.ii:6: error: expected â::â at end of input
> ice-cp_parser_c-342.ii:6: error: expected unqualified-id at end of
> input
> ice-cp_parser_c-342.ii:6: error: expected â;â at end of input
> ice-cp_parser_c-342.ii:6: error: expected â}â at end of input
> ice-cp_parser_c-342.ii:6: internal compiler error: in
> cp_lexer_new_from_tokens,
> at cp/parser.c:342
> --------------------
>
> using 4.4.0 or older the compilation terminates with
>
> ice-cp_parser_c-342.ii:6: confused by earlier errors, bailing out
Then this is not a regression :). That message is the same as an ice
but just for releases;).
>
>
>
> --
> Summary: ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
> Product: gcc
> Version: 4.5.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: c++
> AssignedTo: unassigned at gcc dot gnu dot org
> ReportedBy: gcc at abeckmann dot de
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
2009-04-13 14:43 [Bug c++/39751] New: " gcc at abeckmann dot de
` (2 preceding siblings ...)
2009-04-13 15:06 ` pinskia at gmail dot com
@ 2009-04-13 15:10 ` paolo dot carlini at oracle dot com
2009-04-13 15:12 ` paolo dot carlini at oracle dot com
2010-03-03 23:45 ` zsojka at seznam dot cz
5 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-04-13 15:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2009-04-13 15:10 -------
Indeed, I just checked and 4.4.0 also ICEs when checking is enabled, thus
behaves exactly like 4.5.0.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.5.0 |4.4.0 4.5.0
Known to work|4.4.0 |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
2009-04-13 14:43 [Bug c++/39751] New: " gcc at abeckmann dot de
` (3 preceding siblings ...)
2009-04-13 15:10 ` paolo dot carlini at oracle dot com
@ 2009-04-13 15:12 ` paolo dot carlini at oracle dot com
2010-03-03 23:45 ` zsojka at seznam dot cz
5 siblings, 0 replies; 16+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-04-13 15:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paolo dot carlini at oracle dot com 2009-04-13 15:12 -------
HJ, you are wrong, make sure to pass --enable-checking explicitly in
4_4-branch.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-04-13 15:12:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/39751] ICE in cp_lexer_new_from_tokens, at cp/parser.c:342
2009-04-13 14:43 [Bug c++/39751] New: " gcc at abeckmann dot de
` (4 preceding siblings ...)
2009-04-13 15:12 ` paolo dot carlini at oracle dot com
@ 2010-03-03 23:45 ` zsojka at seznam dot cz
5 siblings, 0 replies; 16+ messages in thread
From: zsojka at seznam dot cz @ 2010-03-03 23:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from zsojka at seznam dot cz 2010-03-03 23:45 -------
It could be regression from 3.3.6.
3.4.6, 4.1.2, 4.2.4, 4.3.4, 4.4.3 built without checking all bail out, while
3.3.6 ends with:
$ g++-3.3.6 xxx.cc
xxx.cc:6: error: ISO C++ forbids declaration of `f' with no type
xxx.cc:6: error: end of file read inside definition
xxx.cc:6: error: syntax error at end of input
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39751
^ permalink raw reply [flat|nested] 16+ messages in thread