public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
@ 2020-07-21  2:30 asolokha at gmx dot com
  2020-07-21  7:00 ` [Bug c++/96258] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2020-07-21  2:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

            Bug ID: 96258
           Summary: [11 Regression] ICE: Segmentation fault (in
                    cp_parser_declaration)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200719 snapshot (g:2e1b25350aa96b3f5678a056d0b55bb323c452d9)
ICEs when compiling a file containing

#pragma omp declare simd

or

#pragma omp declare variant

w/ -fopenmp:

% g++-11.0.0 -fopenmp -c dpdbmn6d.cpp
dpdbmn6d.cpp:1:25: internal compiler error: Segmentation fault
    1 | #pragma omp declare simd
      |                         ^
0x10233ef crash_signal
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/toplev.c:328
0x9dbbec cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:13459
0x9dceef cp_parser_omp_declare_simd
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:41506
0x9abd2d cp_parser_omp_declare
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:42648
0x9abd2d cp_parser_pragma
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:43797
0x9dc3c0 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:4780
0x9dc3c0 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:44062
0xaf9efd c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/c-family/c-opts.c:1188

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
@ 2020-07-21  7:00 ` rguenth at gcc dot gnu.org
  2020-07-21 14:56 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-21  7:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
  2020-07-21  7:00 ` [Bug c++/96258] " rguenth at gcc dot gnu.org
@ 2020-07-21 14:56 ` mpolacek at gcc dot gnu.org
  2020-10-12 12:46 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-21 14:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-07-21
                 CC|                            |mpolacek at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Seems to have started with r11-2137-g765fbbf9bb398560f45987ea9858dfaaefff5ce0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
  2020-07-21  7:00 ` [Bug c++/96258] " rguenth at gcc dot gnu.org
  2020-07-21 14:56 ` mpolacek at gcc dot gnu.org
@ 2020-10-12 12:46 ` rguenth at gcc dot gnu.org
  2020-10-16 14:25 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-12 12:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-10-12 12:46 ` rguenth at gcc dot gnu.org
@ 2020-10-16 14:25 ` marxin at gcc dot gnu.org
  2020-10-16 14:45 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-16 14:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
@Nathan: Can you please take a look?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-10-16 14:25 ` marxin at gcc dot gnu.org
@ 2020-10-16 14:45 ` nathan at gcc dot gnu.org
  2020-10-16 16:25 ` cvs-commit at gcc dot gnu.org
  2020-10-16 16:26 ` nathan at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-10-16 14:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2020-10-16 14:45 ` nathan at gcc dot gnu.org
@ 2020-10-16 16:25 ` cvs-commit at gcc dot gnu.org
  2020-10-16 16:26 ` nathan at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-16 16:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:

https://gcc.gnu.org/g:a16da48bf19bb139e5461e5b5b7f072d5369b054

commit r11-4014-ga16da48bf19bb139e5461e5b5b7f072d5369b054
Author: Nathan Sidwell <nathan@acm.org>
Date:   Fri Oct 16 09:22:22 2020 -0700

    c++: Fix null deref at EOF [PR96258]

    cp_parser_declaration peeks at 1 or 2 tokens, when I changed it not to
    peek past EOF, I set the second token to NULL.  But there are paths
    through the function that just look at the second token.  Fixed by
    setting that token to EOF rather than NULL in this case.

            PR c++/96258
            gcc/cp/
            * parser.c (cp_parser_declaration): Make token2 point to EOF if
            token1 was EOF.
            gcc/testsuite/
            * g++.dg/parse/pr96258.C: New.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/96258] [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)
  2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2020-10-16 16:25 ` cvs-commit at gcc dot gnu.org
@ 2020-10-16 16:26 ` nathan at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-10-16 16:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
resolved a16da48bf19 2020-10-16 | c++: Fix null deref at EOF [PR96258]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-16 16:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21  2:30 [Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration) asolokha at gmx dot com
2020-07-21  7:00 ` [Bug c++/96258] " rguenth at gcc dot gnu.org
2020-07-21 14:56 ` mpolacek at gcc dot gnu.org
2020-10-12 12:46 ` rguenth at gcc dot gnu.org
2020-10-16 14:25 ` marxin at gcc dot gnu.org
2020-10-16 14:45 ` nathan at gcc dot gnu.org
2020-10-16 16:25 ` cvs-commit at gcc dot gnu.org
2020-10-16 16:26 ` nathan 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).