public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/34138]  New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
@ 2007-11-18 10:15 tbm at cyrius dot com
  2007-11-18 10:16 ` [Bug tree-optimization/34138] " tbm at cyrius dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2007-11-18 10:15 UTC (permalink / raw)
  To: gcc-bugs

With current trunk on sparc:

tbm@devel-tbm:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O3 busybox-ash.c
busybox-ash.c: In function 'dotcmd':
busybox-ash.c:15: error: found real variable when subvariables should have
appeared
while verifying SSA_NAME shellparam_17 in statement
# shellparam_17 = VDEF <shellparam_1(D)>
# SFT.31_9 = VDEF <SFT.31_6(D)>
# SMT.38_10 = VDEF <SMT.38_7(D)>
# SMT.39_11 = VDEF <SMT.39_5(D)>
free (D.1273_3);
busybox-ash.c:15: error: found real variable when subvariables should have
appeared
while verifying SSA_NAME shellparam_18 in statement
# shellparam_18 = VDEF <shellparam_17>
# SFT.31_13 = VDEF <SFT.31_9>
# SMT.38_14 = VDEF <SMT.38_10>
# SMT.39_15 = VDEF <SMT.39_11>
free (D.1274_4);
busybox-ash.c:15: error: found real variable when subvariables should have
appeared
busybox-ash.c:15: error: in statement
# shellparam_17 = VDEF <shellparam_1(D)>
# SFT.31_9 = VDEF <SFT.31_6(D)>
# SMT.38_10 = VDEF <SMT.38_7(D)>
# SMT.39_11 = VDEF <SMT.39_5(D)> { shellparam SFT.31 SMT.38 SMT.39 }
free (D.1273_3);
busybox-ash.c:15: internal compiler error: verify_ssa failed
Please submit a full bug report,

This didn't happen with 20071105.


-- 
           Summary: [4.3 Regression] verify_ssa failed (found real variable
                    when subvariables should have appeared)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com
GCC target triplet: sparc-linux-gnu


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
@ 2007-11-18 10:16 ` tbm at cyrius dot com
  2007-11-18 10:16 ` tbm at cyrius dot com
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2007-11-18 10:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tbm at cyrius dot com  2007-11-18 10:15 -------
Created an attachment (id=14574)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14574&action=view)
preprocessed source


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
  2007-11-18 10:16 ` [Bug tree-optimization/34138] " tbm at cyrius dot com
@ 2007-11-18 10:16 ` tbm at cyrius dot com
  2007-11-18 14:38 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2007-11-18 10:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from tbm at cyrius dot com  2007-11-18 10:16 -------
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */

extern void free (void *__ptr);
struct shparam
{
  char **p;
};
static struct shparam shellparam;
void freeparam (volatile struct shparam *param, char **ap)
{
  free ((void *) (*ap));
  free ((void *) (param->p));
}
void dotcmd (char **p)
{
  freeparam (&shellparam, p);
}
void evaltree (void)
{
  void (*evalfn) (char **);
  evalfn = dotcmd;
}


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
  2007-11-18 10:16 ` [Bug tree-optimization/34138] " tbm at cyrius dot com
  2007-11-18 10:16 ` tbm at cyrius dot com
@ 2007-11-18 14:38 ` rguenth at gcc dot gnu dot org
  2007-11-18 20:27 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-18 14:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2007-11-18 14:37 -------
Confirmed.  Also happens on i686.

verify_ssa is after PRE in function dotcmd.  -O2 is enough to trigger the
failure if you mark freeparam inline.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
 GCC target triplet|sparc-linux-gnu             |
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-18 14:37:59
               date|                            |


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (2 preceding siblings ...)
  2007-11-18 14:38 ` rguenth at gcc dot gnu dot org
@ 2007-11-18 20:27 ` pinskia at gcc dot gnu dot org
  2007-11-22  7:32 ` tbm at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-18 20:27 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Target Milestone|---                         |4.3.0


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (3 preceding siblings ...)
  2007-11-18 20:27 ` pinskia at gcc dot gnu dot org
@ 2007-11-22  7:32 ` tbm at gcc dot gnu dot org
  2007-11-27 22:01 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: tbm at gcc dot gnu dot org @ 2007-11-22  7:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tbm at gcc dot gnu dot org  2007-11-22 07:32 -------
*** Bug 34179 has been marked as a duplicate of this bug. ***


-- 

tbm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (4 preceding siblings ...)
  2007-11-22  7:32 ` tbm at gcc dot gnu dot org
@ 2007-11-27 22:01 ` mmitchel at gcc dot gnu dot org
  2007-12-05 19:02 ` janis at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-11-27 22:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (5 preceding siblings ...)
  2007-11-27 22:01 ` mmitchel at gcc dot gnu dot org
@ 2007-12-05 19:02 ` janis at gcc dot gnu dot org
  2007-12-05 19:10 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-12-05 19:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from janis at gcc dot gnu dot org  2007-12-05 19:02 -------
I was going to do a regression hunt on this, but discovered that it doesn't
fail with current cross compilers for sparc-linux and i686-linux.  With
powerpc-linux it fails for 20071120 and passes for 20071130.


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (6 preceding siblings ...)
  2007-12-05 19:02 ` janis at gcc dot gnu dot org
@ 2007-12-05 19:10 ` rguenth at gcc dot gnu dot org
  2007-12-05 19:11 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 19:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2007-12-05 19:10 -------
The bug is at least masked by

2007-11-21  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/34148
        * tree-ssa-structalias.c (create_variable_info_for): Do not use
        field-sensitive PTA for single-element structures.
        * tree-ssa-alias.c (create_overlap_variables_for): Do not create
        SFTs for single-element structures.

as the struct in the testcase has a single field.


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (7 preceding siblings ...)
  2007-12-05 19:10 ` rguenth at gcc dot gnu dot org
@ 2007-12-05 19:11 ` rguenth at gcc dot gnu dot org
  2007-12-05 19:22 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2007-12-05 19:11 -------
extern void free (void *__ptr);
struct shparam
{
  char **p;
  int foo;
};
static struct shparam shellparam;
inline void freeparam (volatile struct shparam *param, char **ap)
{
  free ((void *) (*ap));
  free ((void *) (param->p));
}
void dotcmd (char **p)
{
  freeparam (&shellparam, p);
}
void evaltree (void)
{
  void (*evalfn) (char **);
  evalfn = dotcmd;
}

Still ICEs at -O2 for me.


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (8 preceding siblings ...)
  2007-12-05 19:11 ` rguenth at gcc dot gnu dot org
@ 2007-12-05 19:22 ` rguenth at gcc dot gnu dot org
  2007-12-05 19:49 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 19:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2007-12-05 19:21 -------
The SMT.39 (for char *) has aliases shellparam, SFT.31 and SFT.32 where
shellparam is the parent var of SFT.31 and SFT.32 -- this is the bug.

I will investigate why this happens.


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (9 preceding siblings ...)
  2007-12-05 19:22 ` rguenth at gcc dot gnu dot org
@ 2007-12-05 19:49 ` rguenth at gcc dot gnu dot org
  2007-12-05 20:16 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2007-12-05 19:49 -------
Because shellparam somehow becomes volatile after it got subvars assigned.  Now
onto why TF that happens...


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (10 preceding siblings ...)
  2007-12-05 19:49 ` rguenth at gcc dot gnu dot org
@ 2007-12-05 20:16 ` rguenth at gcc dot gnu dot org
  2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
  2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 20:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2007-12-05 20:16 -------
Another fallout of the PR33604 fix.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |33604
              nThis|                            |
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-11-18 14:37:59         |2007-12-05 20:16:43
               date|                            |


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (12 preceding siblings ...)
  2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
@ 2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 21:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2007-12-05 21:45 -------
Subject: Bug 34138

Author: rguenth
Date: Wed Dec  5 21:45:15 2007
New Revision: 130632

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130632
Log:
2007-12-05  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/34138
        * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
        Do not forward propagate addresses if that changes volatileness of
        the pointed-to type.

        * gcc.c-torture/compile/pr34138.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr34138.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-forwprop.c


-- 


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


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

* [Bug tree-optimization/34138] [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared)
  2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
                   ` (11 preceding siblings ...)
  2007-12-05 20:16 ` rguenth at gcc dot gnu dot org
@ 2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
  2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-05 21:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2007-12-05 21:45 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-12-05 21:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-18 10:15 [Bug tree-optimization/34138] New: [4.3 Regression] verify_ssa failed (found real variable when subvariables should have appeared) tbm at cyrius dot com
2007-11-18 10:16 ` [Bug tree-optimization/34138] " tbm at cyrius dot com
2007-11-18 10:16 ` tbm at cyrius dot com
2007-11-18 14:38 ` rguenth at gcc dot gnu dot org
2007-11-18 20:27 ` pinskia at gcc dot gnu dot org
2007-11-22  7:32 ` tbm at gcc dot gnu dot org
2007-11-27 22:01 ` mmitchel at gcc dot gnu dot org
2007-12-05 19:02 ` janis at gcc dot gnu dot org
2007-12-05 19:10 ` rguenth at gcc dot gnu dot org
2007-12-05 19:11 ` rguenth at gcc dot gnu dot org
2007-12-05 19:22 ` rguenth at gcc dot gnu dot org
2007-12-05 19:49 ` rguenth at gcc dot gnu dot org
2007-12-05 20:16 ` rguenth at gcc dot gnu dot org
2007-12-05 21:45 ` rguenth at gcc dot gnu dot org
2007-12-05 21:45 ` rguenth at gcc dot gnu dot 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).