public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dnovillo at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug optimization/12640] [tree-ssa] strlen builtin causes stack overflow building tk
Date: Wed, 12 Nov 2003 18:32:00 -0000	[thread overview]
Message-ID: <20031112183256.17955.qmail@sources.redhat.com> (raw)
In-Reply-To: <20031016144712.12640.green@redhat.com>


------- Additional Comments From dnovillo at redhat dot com  2003-11-12 18:32 -------
Subject: Re:  [tree-ssa] strlen builtin causes
	stack overflow building tk

On Wed, 2003-11-12 at 13:22, steven at gcc dot gnu dot org wrote:

> ndex: tree-ssa-ccp.c 
> =================================================================== 
> RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-ccp.c,v 
> retrieving revision 1.1.2.108 
> diff -c -3 -p -r1.1.2.108 tree-ssa-ccp.c 
> *** tree-ssa-ccp.c      11 Nov 2003 18:04:46 -0000      1.1.2.108 
> --- tree-ssa-ccp.c      12 Nov 2003 18:20:25 -0000 
> *************** get_strlen (tree arg) 
> *** 1922,1928 **** 
>           arg_len = prev_arg_len = NULL_TREE; 
>           for (i = 0; i < PHI_NUM_ARGS (def_stmt); i++) 
>             { 
> !             arg_len = get_strlen (PHI_ARG_DEF (def_stmt, i)); 
>               if (arg_len == NULL_TREE) 
>                 return NULL_TREE; 
>  
> --- 1922,1939 ---- 
>           arg_len = prev_arg_len = NULL_TREE; 
>           for (i = 0; i < PHI_NUM_ARGS (def_stmt); i++) 
>             { 
> !             tree arg_def_stmt = PHI_ARG_DEF (def_stmt, i); 
> ! 
> !             /* If this PHI has itself as an argument, we cannot 
> !                determine the string length of this argument.  However, 
> !                if we can find a constant string length for the other 
> !                PHI args then we can still be sure that this is a 
> !                constant string length.  So be optimistic and just 
> !                continue with the next argument.  */ 
> !             if (arg_def_stmt == def_stmt) 
> !               continue; 
> ! 
> !             arg_len = get_strlen (arg_def_stmt); 
>               if (arg_len == NULL_TREE) 
>                 return NULL_TREE; 
>  
Looks correct.  Care to take it through a full bootstrap/test cycle?


Diego.



-- 


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


  parent reply	other threads:[~2003-11-12 18:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-16 14:47 [Bug c/12640] New: SEGV " green at redhat dot com
2003-10-16 14:48 ` [Bug c/12640] " green at redhat dot com
2003-10-16 21:32 ` pinskia at gcc dot gnu dot org
2003-10-17 13:40 ` [Bug optimization/12640] stack overflow " pinskia at gcc dot gnu dot org
2003-10-17 13:50 ` pinskia at gcc dot gnu dot org
2003-10-17 14:04 ` [Bug optimization/12640] [tree-ssa] " pinskia at gcc dot gnu dot org
2003-11-02  2:29 ` green at redhat dot com
2003-11-05 15:15 ` [Bug optimization/12640] [tree-ssa] strlen builtin causes " green at redhat dot com
2003-11-12 17:57 ` steven at gcc dot gnu dot org
2003-11-12 18:22 ` steven at gcc dot gnu dot org
2003-11-12 18:32 ` dnovillo at redhat dot com [this message]
2003-11-13  0:41 ` pinskia at gcc dot gnu dot org
2003-11-13  1:04 ` cvs-commit at gcc dot gnu dot org
2003-11-13  1:22 ` pinskia at gcc dot gnu dot 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=20031112183256.17955.qmail@sources.redhat.com \
    --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).