public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65729] [5 Regression] ICE (in prohibited_class_reg_set_mode_p, at lra-constraints.c) on arm-linux-gnueabihf
Date: Fri, 10 Apr 2015 09:04:00 -0000	[thread overview]
Message-ID: <bug-65729-4-aF4Dr8dy66@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65729-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems the ICE or successful compilation aren't the only thing gcc used to
produce here:

old - r218687 ok     
r218688 - r218759 error: inconsistent operand constraints in an ‘asm’   
r218760 - r220293 ok 
r220294 - latest internal compiler error: in prohibited_class_reg_set_mode_p,
at lra-constraints.c
>From gcc-bugs-return-483260-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 10 09:04:20 2015
Return-Path: <gcc-bugs-return-483260-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 110008 invoked by alias); 10 Apr 2015 09:04:19 -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 107718 invoked by uid 48); 10 Apr 2015 09:04:15 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65727] [4.8/4.9/5 Regression] Segfault With Decltype In Lambda Expression Used To Initialize Static Class Member
Date: Fri, 10 Apr 2015 09:04: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: 4.8.2
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: major
X-Bugzilla-Who: mpolacek 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: 4.8.5
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65727-4-kjxR0i1rkJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65727-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65727-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: 2015-04/txt/msg00812.txt.bz2
Content-length: 1435

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Here, we're trying to build_x_indirect_ref for a NULL pointer, that is bad.
The reason is that here
 787       /* In a lambda, need to go through 'this' capture.  */
 788       tree lam = CLASSTYPE_LAMBDA_EXPR (current_class_type);
 789       tree cap = lambda_expr_this_capture (lam, add_capture_p);
 790       if (cap != error_mark_node)
 791         object = build_x_indirect_ref (EXPR_LOCATION (object), cap,
 792                                        RO_NULL, tf_warning_or_error);
lambda_expr_this_capture returns NULL: it's looking for 'this', but doesn't
find it.

The fix in r215478 [1] dealt with not finding 'this' by checking for
error_mark, but perhaps we should also check whether the capture is non-NULL:

--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -787,7 +787,7 @@ maybe_resolve_dummy (tree object, bool add_capture_p)
       /* In a lambda, need to go through 'this' capture.  */
       tree lam = CLASSTYPE_LAMBDA_EXPR (current_class_type);
       tree cap = lambda_expr_this_capture (lam, add_capture_p);
-      if (cap != error_mark_node)
+      if (cap && cap != error_mark_node)
        object = build_x_indirect_ref (EXPR_LOCATION (object), cap,
                                       RO_NULL, tf_warning_or_error);
     }

[1] https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01878.html


  parent reply	other threads:[~2015-04-10  9:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  3:03 [Bug target/65729] New: [5 Regression] ICE (segfault) " doko at gcc dot gnu.org
2015-04-10  7:07 ` [Bug target/65729] [5 Regression] ICE (in prohibited_class_reg_set_mode_p, at lra-constraints.c) " jakub at gcc dot gnu.org
2015-04-10  7:47 ` rguenth at gcc dot gnu.org
2015-04-10  9:04 ` jakub at gcc dot gnu.org [this message]
2015-04-10  9:20 ` ktkachov at gcc dot gnu.org
2015-04-10 15:49 ` vmakarov at gcc dot gnu.org
2015-04-10 15:53 ` jakub at gcc dot gnu.org
2015-04-10 16:03 ` yroux at gcc dot gnu.org
2015-04-10 16:06 ` vmakarov at gcc dot gnu.org
2015-04-10 16:08 ` [Bug target/65729] [5/6 " jakub at gcc dot gnu.org
2015-04-10 16:13 ` [Bug target/65729] [5 " vmakarov at gcc dot gnu.org
2015-04-10 16:43 ` [Bug target/65729] [5/6 " jakub at gcc dot gnu.org
2015-04-15 13:07 ` yroux 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-65729-4-aF4Dr8dy66@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).