public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30562]  New: ice for legal code with -O2
@ 2007-01-23 20:54 dcb314 at hotmail dot com
  2007-01-23 20:55 ` [Bug c++/30562] " dcb314 at hotmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2007-01-23 20:54 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile Suse Linux package limal-ca-mgm-1.2.9-14
with the GNU C++ compiler version 4.3 snapshot 20070119.

The compiler said

/usr/include/blocxx/List.hpp: In member function 'void
blocxx4::List<T>::push_back(const T&) [with T = blocxx4::String]':
/usr/include/blocxx/List.hpp:362: internal compiler error: in
referenced_var_lookup, at tree-dfa.c:626
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O2 required.


-- 
           Summary: ice for legal code with -O2
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug c++/30562] ice for legal code with -O2
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
@ 2007-01-23 20:55 ` dcb314 at hotmail dot com
  2007-01-25 17:23 ` [Bug c++/30562] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2007-01-23 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dcb314 at hotmail dot com  2007-01-23 20:55 -------
Created an attachment (id=12939)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12939&action=view)
C++ source code


-- 


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


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

* [Bug c++/30562] [4.3 Regression] ice for legal code with -O2
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
  2007-01-23 20:55 ` [Bug c++/30562] " dcb314 at hotmail dot com
@ 2007-01-25 17:23 ` pinskia at gcc dot gnu dot org
  2007-01-27  3:41 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-25 17:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-01-25 17:22 -------
This was caused by the MEM-ssa merge, I thought I had a patch but it crashed
during build __gcc_bcmp.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-valid-code
            Summary|ice for legal code with -O2 |[4.3 Regression] ice for
                   |                            |legal code with -O2
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/30562] [4.3 Regression] ice for legal code with -O2
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
  2007-01-23 20:55 ` [Bug c++/30562] " dcb314 at hotmail dot com
  2007-01-25 17:23 ` [Bug c++/30562] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-01-27  3:41 ` pinskia at gcc dot gnu dot org
  2007-02-05 19:49 ` [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS) dnovillo at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-27  3:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-01-27 03:40 -------
the failure during bootstrap I have a fix for now.  So I have a patch.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-01-27 03:40:54
               date|                            |


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2007-01-27  3:41 ` pinskia at gcc dot gnu dot org
@ 2007-02-05 19:49 ` dnovillo at gcc dot gnu dot org
  2007-02-07 23:33 ` dnovillo at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2007-02-05 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dnovillo at gcc dot gnu dot org  2007-02-05 19:48 -------

Testing alternate patch.


-- 


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2007-02-05 19:49 ` [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS) dnovillo at gcc dot gnu dot org
@ 2007-02-07 23:33 ` dnovillo at gcc dot gnu dot org
  2007-02-08 16:56 ` dnovillo at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2007-02-07 23:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dnovillo at gcc dot gnu dot org  2007-02-07 23:33 -------

I cannot reproduce this bug with mainline as of 2007-02-06.  The bug is still
latent though, so I will commit a variant of this patch to fix it. 
Essentially, we should leave every TREE_ADDRESSABLE variable alone so that it
can be removed by a subsequent may_alias pass:

Index: tree-ssa-live.c
===================================================================
--- tree-ssa-live.c     (revision 121699)
+++ tree-ssa-live.c     (working copy)
@@ -502,18 +502,20 @@
       cell = &TREE_CHAIN (*cell);
     }

-  /* Remove unused variables from REFERENCED_VARs.  As an special exception
-     keep the variables that are believed to be aliased.  Those can't be
-     easily removed from the alias sets and and operand caches.
-     They will be removed shortly after next may_alias pass is performed.  */
+  /* Remove unused variables from REFERENCED_VARs.  As a special
+     exception keep the variables that are believed to be aliased.
+     Those can't be easily removed from the alias sets and operand
+     caches.  They will be removed shortly after the next may_alias
+     pass is performed.  */
   FOR_EACH_REFERENCED_VAR (t, rvi)
     if (!is_global_var (t)
        && !MTAG_P (t)
        && TREE_CODE (t) != PARM_DECL
        && TREE_CODE (t) != RESULT_DECL
        && !(ann = var_ann (t))->used
-       && !ann->is_aliased && !is_call_clobbered (t) && !ann->symbol_mem_tag)
-        remove_referenced_var (t);
+       && !ann->symbol_mem_tag
+       && !TREE_ADDRESSABLE (t))
+      remove_referenced_var (t);
 }


-- 

dnovillo at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2007-02-07 23:33 ` dnovillo at gcc dot gnu dot org
@ 2007-02-08 16:56 ` dnovillo at gcc dot gnu dot org
  2007-02-08 17:10 ` dnovillo at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2007-02-08 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dnovillo at gcc dot gnu dot org  2007-02-08 16:56 -------
Subject: Bug 30562

Author: dnovillo
Date: Thu Feb  8 16:55:43 2007
New Revision: 121715

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121715
Log:

        PR 30562
        * tree-flow.h (struct var_ann_d): Remove field 'is_used'.
        Update all users.
        * tree-ssa-alias.c (compute_is_aliased): Remove.  Update all
        users.
        (init_alias_info):
        * tree-ssa-live.c (remove_unused_locals): Do not remove
        TREE_ADDRESSABLE variables.
        * tree-ssa-structalias.c (compute_points_to_sets): Tidy.
        * tree-ssa-operands.c (add_virtual_operand): Remove argument
        FOR_CLOBBER.  Update all users.
        If VAR has an associated alias set, add a virtual operand for
        it if no alias is found to conflict with the memory reference.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-dfa.c
    trunk/gcc/tree-flow.h
    trunk/gcc/tree-ssa-alias.c
    trunk/gcc/tree-ssa-live.c
    trunk/gcc/tree-ssa-operands.c
    trunk/gcc/tree-ssa-structalias.c
    trunk/gcc/tree-ssa.c


-- 


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2007-02-08 16:56 ` dnovillo at gcc dot gnu dot org
@ 2007-02-08 17:10 ` dnovillo at gcc dot gnu dot org
  2007-02-08 17:30 ` aldot at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2007-02-08 17:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dnovillo at gcc dot gnu dot org  2007-02-08 17:10 -------

Fix http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00727.html


-- 


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2007-02-08 17:10 ` dnovillo at gcc dot gnu dot org
@ 2007-02-08 17:30 ` aldot at gcc dot gnu dot org
  2007-03-20 15:31 ` pthaugen at us dot ibm dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: aldot at gcc dot gnu dot org @ 2007-02-08 17:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from aldot at gcc dot gnu dot org  2007-02-08 17:30 -------
I was seeing this bug when building with BOOT_CFLAGS=-march=nocona\
-mtune=nocona\ -O2 that later ICE'd for ../gcc/libgcc2.c:557

I don't have access to that x86_64 with ubuntu anymore so cannot check if the
patch does fix it, unfortunately.


-- 


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2007-02-08 17:30 ` aldot at gcc dot gnu dot org
@ 2007-03-20 15:31 ` pthaugen at us dot ibm dot com
  2007-03-20 15:37 ` pinskia at gcc dot gnu dot org
  2007-03-20 15:54 ` pthaugen at us dot ibm dot com
  10 siblings, 0 replies; 12+ messages in thread
From: pthaugen at us dot ibm dot com @ 2007-03-20 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pthaugen at us dot ibm dot com  2007-03-20 15:31 -------
Looks like I can reproduce with mainline using -O2 -ftree-loop-linear when
building galgel benchmark from cpu2000.

(My FORTRAN skills are lacking, so couldn't whittle down to a single testcase,
but got close)

178.galgel/run> /home/pthaugen/install/gcc/trunk/bin/gfortran -c -m64
-ffixed-form -O2 -ftree-loop-linear modules.f90
178.galgel/run> /home/pthaugen/install/gcc/trunk/bin/gfortran -c -m64
-ffixed-form -O2 -ftree-loop-linear sysnsL.f90
sysnsL.f90: In function #sysnsl#:
sysnsL.f90:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

(gdb) run
Starting program:
/home/pthaugen/install/gcc/trunk/libexec/gcc/powerpc64-linux/4.3.0/f951
sysnsL.f90 -quiet -dumpbase sysnsL.f90 -m64 -auxbase sysnsL -O2 -version
-ffixed-form -ftree-loop-linear -fintrinsic-modules-path
/home/pthaugen/install/gcc/trunk/lib/gcc/powerpc64-linux/4.3.0/finclude -o
sysnsL.s
GNU F95 version 4.3.0 20070314 (experimental) (powerpc64-linux)
        compiled by GNU C version 4.1.0 (SUSE Linux).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Program received signal SIGSEGV, Segmentation fault.
remove_referenced_var (var=<value optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/tree-dfa.c:771
771       ggc_free (*loc);
(gdb) bt 5
#0  remove_referenced_var (var=<value optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/tree-dfa.c:771
#1  0x103d1238 in remove_unused_locals ()
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/tree-ssa-live.c:518
#2  0x1026f204 in execute_function_todo (data=<value optimized out>)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/passes.c:865
#3  0x1026ee44 in do_per_function (callback=0x1026efe0 <execute_function_todo>,
data=0x21)
    at /home/pthaugen/src/gcc/trunk/gcc/gcc/passes.c:757
#4  0x1026ef4c in execute_todo (flags=33) at
/home/pthaugen/src/gcc/trunk/gcc/gcc/passes.c:935
(More stack frames follow...)


-- 

pthaugen at us dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pthaugen at us dot ibm dot
                   |                            |com


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2007-03-20 15:31 ` pthaugen at us dot ibm dot com
@ 2007-03-20 15:37 ` pinskia at gcc dot gnu dot org
  2007-03-20 15:54 ` pthaugen at us dot ibm dot com
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-20 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2007-03-20 15:37 -------
> Looks like I can reproduce with mainline using -O2 -ftree-loop-linear when
> building galgel benchmark from cpu2000.

This is a different issue and should be filed in a different bug.


-- 


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


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

* [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS)
  2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
                   ` (9 preceding siblings ...)
  2007-03-20 15:37 ` pinskia at gcc dot gnu dot org
@ 2007-03-20 15:54 ` pthaugen at us dot ibm dot com
  10 siblings, 0 replies; 12+ messages in thread
From: pthaugen at us dot ibm dot com @ 2007-03-20 15:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pthaugen at us dot ibm dot com  2007-03-20 15:54 -------
31280 opened.


-- 


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


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

end of thread, other threads:[~2007-03-20 15:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-23 20:54 [Bug c++/30562] New: ice for legal code with -O2 dcb314 at hotmail dot com
2007-01-23 20:55 ` [Bug c++/30562] " dcb314 at hotmail dot com
2007-01-25 17:23 ` [Bug c++/30562] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-01-27  3:41 ` pinskia at gcc dot gnu dot org
2007-02-05 19:49 ` [Bug tree-optimization/30562] [4.3 Regression] remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS) dnovillo at gcc dot gnu dot org
2007-02-07 23:33 ` dnovillo at gcc dot gnu dot org
2007-02-08 16:56 ` dnovillo at gcc dot gnu dot org
2007-02-08 17:10 ` dnovillo at gcc dot gnu dot org
2007-02-08 17:30 ` aldot at gcc dot gnu dot org
2007-03-20 15:31 ` pthaugen at us dot ibm dot com
2007-03-20 15:37 ` pinskia at gcc dot gnu dot org
2007-03-20 15:54 ` pthaugen at us dot ibm dot com

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).