public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/56824] pragma GCC diagnostic push/pop regression for GCC diagnostic ignored "-Waggregate-return"
Date: Wed, 10 Apr 2013 18:32:00 -0000	[thread overview]
Message-ID: <bug-56824-4-FS4JKm3idP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56824-4@http.gcc.gnu.org/bugzilla/>


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-04-10
                 CC|                            |manu at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-10 18:32:00 UTC ---
I think the problem is the continue, which moves to the next i--:

Index: diagnostic.c
===================================================================
--- diagnostic.c        (revision 197394)
+++ diagnostic.c        (working copy)
@@ -664,13 +685,13 @@ diagnostic_report_diagnostic (diagnostic
        return false;

       /* This tests for #pragma diagnostic changes.  */
       if (context->n_classification_history > 0)
        {
-         int i;
+         int i = context->n_classification_history - 1;
          /* FIXME: Stupid search.  Optimize later. */
-         for (i = context->n_classification_history - 1; i >= 0; i --)
+         while (i >= 0)
            {
              if (linemap_location_before_p
                  (line_table,
                   context->classification_history[i].location,
                   location))
@@ -686,10 +707,11 @@ diagnostic_report_diagnostic (diagnostic
                      if (diag_class != DK_UNSPECIFIED)
                        diagnostic->kind = diag_class;
                      break;
                    }
                }
+              i--;
            }
        }
       /* This tests if the user provided the appropriate -Werror=foo
         option.  */
       if (diag_class == DK_UNSPECIFIED

but someone would need to test the patch.

But it is a bug.
>From gcc-bugs-return-419724-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 10 18:33:53 2013
Return-Path: <gcc-bugs-return-419724-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3753 invoked by alias); 10 Apr 2013 18:33:53 -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 3730 invoked by uid 48); 10 Apr 2013 18:33:50 -0000
From: "markus at trippelsdorf dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/56911] [4.8 Regression] g++.dg/cpp0x/enum25.C:14:19: ICE: in finish_class_member_access_expr, at cp/typeck.c:2673 with -fpic
Date: Wed, 10 Apr 2013 18:33: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-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: markus at trippelsdorf dot de
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: CC
Message-ID: <bug-56911-4-GSPWCmKTYH@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-56911-4@http.gcc.gnu.org/bugzilla/>
References: <bug-56911-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg00869.txt.bz2
Content-length: 1556


http://gcc.gnu.org/bugzilla/show_bug.cgi?idV911

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2013-04-10 18:33:50 UTC ---
Hmm, I can confirm the ICE (and it's not the only one in this directory):

 % g++ -c -fpic -std=c++11 gcc/testsuite/g++.dg/cpp0x/*.C 2>&1 | grep internal
gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C:6:23: internal compiler error:
Segmentation fault
gcc/testsuite/g++.dg/cpp0x/constexpr-reinterpret1.C:37:49: internal compiler
error: in gimple_expand_cfg, at cfgexpand.c:4575
gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C:8:36: internal compiler error:
Segmentation fault
gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C:6:29: internal compiler error:
in convert_nontype_argument, at cp/pt.c:5558
gcc/testsuite/g++.dg/cpp0x/enum25.C:14:19: internal compiler error: in
finish_class_member_access_expr, at cp/typeck.c:2673
gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C:7:12: internal compiler error: in
expand_expr_real_1, at expr.c:9327
gcc/testsuite/g++.dg/cpp0x/range-for23.C:6:20: internal compiler error:
Segmentation fault
gcc/testsuite/g++.dg/cpp0x/trailing9.C:10:14: internal compiler error: in
cp_parser_late_return_type_opt, at cp/parser.c:16970


  parent reply	other threads:[~2013-04-10 18:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03  7:40 [Bug c/56824] New: " magnus.reftel at gmail dot com
2013-04-10  8:10 ` [Bug c/56824] " magnus.reftel at gmail dot com
2013-04-10 18:32 ` manu at gcc dot gnu.org [this message]
2013-04-12  7:42 ` magnus.reftel at gmail dot com
2013-04-12  9:12 ` manu at gcc dot gnu.org
2013-08-08 18:37 ` magnus.reftel at gmail dot com
2013-08-10 16:14 ` mikpe at it dot uu.se
2013-11-19  9:46 ` [Bug c/56824] [4.8/4.9 regression] pragma GCC diagnostic push/pop fail with " rguenth at gcc dot gnu.org
2013-11-22 10:45 ` rguenth at gcc dot gnu.org
2014-02-05 14:15 ` [Bug preprocessor/56824] " jakub at gcc dot gnu.org
2014-02-07  7:03 ` magnus.reftel at gmail dot com
2014-02-07 16:43 ` jakub at gcc dot gnu.org
2014-02-08  0:10 ` [Bug preprocessor/56824] [4.8 " jakub at gcc dot gnu.org
2014-02-10 15:56 ` magnus.reftel at gmail dot com
2014-03-06  7:58 ` jakub at gcc dot gnu.org
2014-03-06  8:27 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56824-4-FS4JKm3idP@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).