public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/97742] New: endless loop with code reduced by creduce/cvise
@ 2020-11-06 10:20 doko at debian dot org
  2020-11-06 12:15 ` [Bug c++/97742] " marxin at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: doko at debian dot org @ 2020-11-06 10:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97742
           Summary: endless loop with code reduced by creduce/cvise
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

Created attachment 49514
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49514&action=edit
preprocessed source

seen with the gcc-10 branch, seen while reducing via cvise/creduce


$ g++ -c -std=c++17 -fconcepts -Wall search_collection_test.ii
In file included from search_collection_test.ii:689:
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:1148:13: error: expected
primary-expression before ‘namespace’
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:1150:11: error: expected
‘;’ before ‘namespace’
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:1165:12: error: expected
primary-expression before ‘namespace’
In file included from search_collection_test.ii:689:
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:1187:11: error: expected
‘;’ before ‘namespace’
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:1191:13: error: expected
primary-expression before ‘namespace’
[...]

the compiler continues to emit error messages, doesn't terminate.

compiler configured with --enable-checking=yes,extra,rtl

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

* [Bug c++/97742] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
@ 2020-11-06 12:15 ` marxin at gcc dot gnu.org
  2020-11-06 12:20 ` marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-06 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-11-06

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced to:

$ cat search_collection_test.ii
template < = requires {

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

* [Bug c++/97742] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
  2020-11-06 12:15 ` [Bug c++/97742] " marxin at gcc dot gnu.org
@ 2020-11-06 12:20 ` marxin at gcc dot gnu.org
  2020-12-07 12:45 ` [Bug c++/97742] [10/11 Regression] " rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-06 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-3735-gcb57504a55015891.

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

* [Bug c++/97742] [10/11 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
  2020-11-06 12:15 ` [Bug c++/97742] " marxin at gcc dot gnu.org
  2020-11-06 12:20 ` marxin at gcc dot gnu.org
@ 2020-12-07 12:45 ` rguenth at gcc dot gnu.org
  2021-01-14  9:36 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-07 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.3

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

* [Bug c++/97742] [10/11 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (2 preceding siblings ...)
  2020-12-07 12:45 ` [Bug c++/97742] [10/11 Regression] " rguenth at gcc dot gnu.org
@ 2021-01-14  9:36 ` rguenth at gcc dot gnu.org
  2021-01-21 18:06 ` mpolacek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14  9:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/97742] [10/11 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (3 preceding siblings ...)
  2021-01-14  9:36 ` rguenth at gcc dot gnu.org
@ 2021-01-21 18:06 ` mpolacek at gcc dot gnu.org
  2021-02-11 13:53 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-21 18:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Slightly more realistic test:

template <int = requires { true >
struct X { };

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

* [Bug c++/97742] [10/11 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (4 preceding siblings ...)
  2021-01-21 18:06 ` mpolacek at gcc dot gnu.org
@ 2021-02-11 13:53 ` jakub at gcc dot gnu.org
  2021-02-12  3:14 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-11 13:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50166
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50166&action=edit
gcc11-pr97742.patch

Untested fix.

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

* [Bug c++/97742] [10/11 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (5 preceding siblings ...)
  2021-02-11 13:53 ` jakub at gcc dot gnu.org
@ 2021-02-12  3:14 ` mpolacek at gcc dot gnu.org
  2021-02-12  8:58 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-12  3:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/97742] [10/11 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (6 preceding siblings ...)
  2021-02-12  3:14 ` mpolacek at gcc dot gnu.org
@ 2021-02-12  8:58 ` cvs-commit at gcc dot gnu.org
  2021-02-12  8:59 ` [Bug c++/97742] [10 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-12  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

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

commit r11-7206-gcf059e1c099ed45c97f740c030dcb8e146ac7d4a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 12 09:55:46 2021 +0100

    c++: Fix endless errors on invalid requirement seq [PR97742]

    As the testcase shows, if we reach CPP_EOF during parsing of requirement
    sequence, we end up with endless loop where we always report invalid
    requirement expression, don't consume any token (as we are at eof) and
    repeat.

    This patch stops the loop when we reach CPP_EOF.

    2021-02-12  Jakub Jelinek  <jakub@redhat.com>

            PR c++/97742
            * parser.c (cp_parser_requirement_seq): Stop iterating after
reaching
            CPP_EOF.

            * g++.dg/cpp2a/concepts-requires24.C: New test.

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

* [Bug c++/97742] [10 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (7 preceding siblings ...)
  2021-02-12  8:58 ` cvs-commit at gcc dot gnu.org
@ 2021-02-12  8:59 ` jakub at gcc dot gnu.org
  2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-12  8:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11 Regression] endless  |[10 Regression] endless
                   |loop with code reduced by   |loop with code reduced by
                   |creduce/cvise               |creduce/cvise

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.

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

* [Bug c++/97742] [10 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (8 preceding siblings ...)
  2021-02-12  8:59 ` [Bug c++/97742] [10 " jakub at gcc dot gnu.org
@ 2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
  2021-03-20  8:07 ` jakub at gcc dot gnu.org
  2021-04-27 10:44 ` redi at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-19 23:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

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

commit r10-9469-ga7237df0aa26f74cc52103f5c8dba5f0efbb198f
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 12 09:55:46 2021 +0100

    c++: Fix endless errors on invalid requirement seq [PR97742]

    As the testcase shows, if we reach CPP_EOF during parsing of requirement
    sequence, we end up with endless loop where we always report invalid
    requirement expression, don't consume any token (as we are at eof) and
    repeat.

    This patch stops the loop when we reach CPP_EOF.

    2021-02-12  Jakub Jelinek  <jakub@redhat.com>

            PR c++/97742
            * parser.c (cp_parser_requirement_seq): Stop iterating after
reaching
            CPP_EOF.

            * g++.dg/cpp2a/concepts-requires24.C: New test.

    (cherry picked from commit cf059e1c099ed45c97f740c030dcb8e146ac7d4a)

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

* [Bug c++/97742] [10 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (9 preceding siblings ...)
  2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
@ 2021-03-20  8:07 ` jakub at gcc dot gnu.org
  2021-04-27 10:44 ` redi at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-20  8:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3 too.

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

* [Bug c++/97742] [10 Regression] endless loop with code reduced by creduce/cvise
  2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
                   ` (10 preceding siblings ...)
  2021-03-20  8:07 ` jakub at gcc dot gnu.org
@ 2021-04-27 10:44 ` redi at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-27 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |igfoo at github dot com

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 98700 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-04-27 10:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 10:20 [Bug other/97742] New: endless loop with code reduced by creduce/cvise doko at debian dot org
2020-11-06 12:15 ` [Bug c++/97742] " marxin at gcc dot gnu.org
2020-11-06 12:20 ` marxin at gcc dot gnu.org
2020-12-07 12:45 ` [Bug c++/97742] [10/11 Regression] " rguenth at gcc dot gnu.org
2021-01-14  9:36 ` rguenth at gcc dot gnu.org
2021-01-21 18:06 ` mpolacek at gcc dot gnu.org
2021-02-11 13:53 ` jakub at gcc dot gnu.org
2021-02-12  3:14 ` mpolacek at gcc dot gnu.org
2021-02-12  8:58 ` cvs-commit at gcc dot gnu.org
2021-02-12  8:59 ` [Bug c++/97742] [10 " jakub at gcc dot gnu.org
2021-03-19 23:29 ` cvs-commit at gcc dot gnu.org
2021-03-20  8:07 ` jakub at gcc dot gnu.org
2021-04-27 10:44 ` redi 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).