public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom de Vries <Tom_deVries@mentor.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Biener <rguenther@suse.de>, <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Handle __builtin_unreachable () using assertions in VRP
Date: Mon, 04 Nov 2013 10:46:00 -0000	[thread overview]
Message-ID: <52777AEA.2040305@mentor.com> (raw)
In-Reply-To: <5276F182.8090006@mentor.com>

On 04/11/13 01:59, Tom de Vries wrote:
> On 29/10/13 14:54, Jakub Jelinek wrote:
>> +/* Return true if all imm uses of VAR are either in STMT, or
>> +   feed (optionally through a chain of single imm uses) GIMPLE_COND
>> +   in basic block COND_BB.  */
>> +
>> +static bool
>> +all_imm_uses_in_stmt_or_feed_cond (tree var, gimple stmt, basic_block cond_bb)
>> +{
>> +  use_operand_p use_p, use2_p;
>> +  imm_use_iterator iter;
>> +
>> +  FOR_EACH_IMM_USE_FAST (use_p, iter, var)
>> +    if (USE_STMT (use_p) != stmt)
>> +      {
>> +	gimple use_stmt = USE_STMT (use_p);
>> +	if (is_gimple_debug (use_stmt))
>> +	  continue;
>> +	while (is_gimple_assign (use_stmt)
>> +	       && single_imm_use (gimple_assign_lhs (use_stmt),
>> +				  &use2_p, &use_stmt))
>> +	  ;
>> +	if (gimple_code (use_stmt) != GIMPLE_COND
>> +	    || gimple_bb (use_stmt) != cond_bb)
>> +	  return false;
>> +      }
>> +  return true;
>> +}
>> +
> 
> Jakub,
> 
> with g++.dg/torture/pr54684.C and -fno-tree-tail-merge, I run into a sigsegv
> because of gimple_code (use_stmt) being called with use_stmt == NULL.
> 

It's a duplicate of PR58978 - '[4.9 Regression] ICE: Segmentation fault'
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58978

Thanks,
- Tom

      reply	other threads:[~2013-11-04 10:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-25  9:13 Jakub Jelinek
2013-10-29 12:05 ` Richard Biener
2013-10-29 14:15   ` Jakub Jelinek
2013-10-29 14:41     ` Richard Biener
2013-11-04  1:00     ` Tom de Vries
2013-11-04 10:46       ` Tom de Vries [this message]

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=52777AEA.2040305@mentor.com \
    --to=tom_devries@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=rguenther@suse.de \
    /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).