public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59804] New: C++ front-end checking ends in an infinite loop on erroneous code
@ 2014-01-14 13:25 jamborm at gcc dot gnu.org
  2014-09-27 15:23 ` [Bug c++/59804] " manu at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-01-14 13:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59804

            Bug ID: 59804
           Summary: C++ front-end checking ends in an infinite loop on
                    erroneous code
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org

Created attachment 31831
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31831&action=edit
Testcase

I discovered this problem when multidelta-reducing a different PR.
Multidelta produced this invalid source that however causes the c++
front-end of an checking-enabled compiler to end up in an infinite
loop (or just takes incredible time to finish but I doubt that).

Release-checking g++ compains about errors and exits normally.

x86_64-linux, no compiler options necessary.


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

* [Bug c++/59804] C++ front-end checking ends in an infinite loop on erroneous code
  2014-01-14 13:25 [Bug c++/59804] New: C++ front-end checking ends in an infinite loop on erroneous code jamborm at gcc dot gnu.org
@ 2014-09-27 15:23 ` manu at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: manu at gcc dot gnu.org @ 2014-09-27 15:23 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery,
                   |                            |ice-checking
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-27
                 CC|                            |manu at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.9.0, 5.0

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
It is recursing here:
1396    #ifdef ENABLE_CHECKING
1397          if (USE_CANONICAL_TYPES)
1398            {
1399              bool result = structural_comptypes (t1, t2, strict);

so we get:

#0  comptypes (t1=0x7ffff6db4000, t2=0x7ffff6d59000, strict=<optimized out>) at
/home/manuel/test1/pristine/gcc/cp/typeck.c:1401
#1  0x00000000006f5e1e in structural_comptypes (t1=0x7ffff6db42a0,
t2=0x7ffff6d592a0, strict=0) at
/home/manuel/test1/pristine/gcc/cp/typeck.c:1341
#2  0x00000000006f7c88 in comptypes (t1=0x7ffff6db42a0, t2=0x7ffff6d592a0,
strict=<optimized out>) at /home/manuel/test1/pristine/gcc/cp/typeck.c:1399
#3  0x00000000006f5e1e in structural_comptypes (t1=0x7ffff6db4540,
t2=0x7ffff6d59540, strict=0) at
/home/manuel/test1/pristine/gcc/cp/typeck.c:1341
#4  0x00000000006f7c88 in comptypes (t1=0x7ffff6db4540, t2=0x7ffff6d59540,
strict=<optimized out>) at /home/manuel/test1/pristine/gcc/cp/typeck.c:1399
#5  0x00000000006f5e1e in structural_comptypes (t1=0x7ffff6db47e0,
t2=0x7ffff6d597e0, strict=0) at
/home/manuel/test1/pristine/gcc/cp/typeck.c:1341
#6  0x00000000006f7c88 in comptypes (t1=0x7ffff6db47e0, t2=0x7ffff6d597e0,
strict=<optimized out>) at /home/manuel/test1/pristine/gcc/cp/typeck.c:1399
#7  0x00000000006f5e1e in structural_comptypes (t1=0x7ffff6db4a80,
t2=0x7ffff6d59a80, strict=0) at
/home/manuel/test1/pristine/gcc/cp/typeck.c:1341
#8  0x00000000006f7c88 in comptypes (t1=0x7ffff6db4a80, t2=0x7ffff6d59a80,
strict=<optimized out>) at /home/manuel/test1/pristine/gcc/cp/typeck.c:1399
#9  0x00000000006f5e1e in structural_comptypes (t1=0x7ffff6db4d20,
t2=0x7ffff6d59d20, strict=0) at
/home/manuel/test1/pristine/gcc/cp/typeck.c:1341
>From gcc-bugs-return-462714-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 27 15:46:32 2014
Return-Path: <gcc-bugs-return-462714-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16432 invoked by alias); 27 Sep 2014 15:46:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 16398 invoked by uid 48); 27 Sep 2014 15:46:28 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/16564] g++ seems to go into an infinite loop after errors
Date: Sat, 27 Sep 2014 15:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: compile-time-hog, diagnostic
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-16564-4-n6FnirQXyS@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-16564-4@http.gcc.gnu.org/bugzilla/>
References: <bug-16564-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg02548.txt.bz2
Content-length: 686

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

--- Comment #22 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Volker Reichelt from comment #18)
> The first error message about exceeding the maximum template instantiation
> depth appears rather quickly. So maybe we could make the first error message
> a fatal one to avoid further processing of potentially bogus nested classes.

This is a patch doing exactly that:
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01709.html

However, I probably won't have time until the Christmas holidays to work on it,
so please anyone feel free to take it and get it reviewed and applied. Thanks!
>From gcc-bugs-return-462715-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Sep 27 16:26:07 2014
Return-Path: <gcc-bugs-return-462715-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32194 invoked by alias); 27 Sep 2014 16:26:07 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 32125 invoked by uid 48); 27 Sep 2014 16:26:01 -0000
From: "ingo.josopait at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/63389] New: Wrong warning about 64 bit integer constant overflow
Date: Sat, 27 Sep 2014 16:26:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: minor
X-Bugzilla-Who: ingo.josopait at gmx dot de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-63389-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg02549.txt.bz2
Content-length: 892

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc389

            Bug ID: 63389
           Summary: Wrong warning about 64 bit integer constant overflow
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ingo.josopait at gmx dot de

Declaring the following constant creates a warning. I don't think it should.
-2^63 is the largest negative 64 bit integer value. The same warning appears
when compiling C language.


long i = -9223372036854775808L;   // equals -2^63



The compiler output is:

test.cpp:1:11: warning: integer constant is so large that it is unsigned
 long i = -9223372036854775808L;
           ^
test.cpp:1:1: warning: this decimal constant is unsigned only in ISO C90
 long i = -9223372036854775808L;


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

end of thread, other threads:[~2014-09-27 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 13:25 [Bug c++/59804] New: C++ front-end checking ends in an infinite loop on erroneous code jamborm at gcc dot gnu.org
2014-09-27 15:23 ` [Bug c++/59804] " manu 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).