public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug
@ 2010-12-13 22:54 meissner at gcc dot gnu.org
  2010-12-14  6:00 ` [Bug regression/46931] " hjl.tools at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: meissner at gcc dot gnu.org @ 2010-12-13 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Subversion id 167184 breaks building perlbench on
                    power7 with debug
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: regression
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: meissner@gcc.gnu.org
                CC: matz@suse.de
              Host: powerpc64-linux
            Target: powerpc64-linux
             Build: powerpc64-linux


Created attachment 22748
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22748
Stripped down file that shows the problem

GCC has a segmentation violation when compiling the spec 2006 benchmark
perlbench on powerpc64-linux systems with the -O2 -ftree-vectorize -mcpu=power7
-g options.

Here is the traceback:
 -igoo-> /opt/at4.0/bin/gdb cc1
'import site' failed; use -v for traceback
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc64-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/meissner/fsf-build-ppc64/bug/gcc/cc1...done.
Breakpoint 1 at 0x101f95ec: file /home/meissner/fsf-src/bug/gcc/diagnostic.c,
line 893.
Breakpoint 2 at 0x101f9548: file /home/meissner/fsf-src/bug/gcc/diagnostic.c,
line 838.
Breakpoint 3 at 0x10a45678
Breakpoint 4 at 0x10a45260
(gdb) r -O2 -ftree-vectorize -mcpu=power7 -g -quiet pp.i
Starting program: /home/meissner/fsf-build-ppc64/bug/gcc/cc1 -O2
-ftree-vectorize -mcpu=power7 -m64 -g -quiet pp.i

Program received signal SIGSEGV, Segmentation fault.
gsi_for_stmt (stmt=0xfffb659af50) at
/home/meissner/fsf-src/bug/gcc/gimple-iterator.c:554
554         i = gsi_start_bb (bb);
(gdb) where
#0  gsi_for_stmt (stmt=0xfffb659af50) at
/home/meissner/fsf-src/bug/gcc/gimple-iterator.c:554
#1  0x0000000010660998 in insert_debug_temp_for_var_def (gsi=0x0,
var=0xfffb693b318) at /home/meissner/fsf-src/bug/gcc/tree-ssa.c:444
#2  0x0000000010663ff8 in release_ssa_name (var=0xfffb693b318) at
/home/meissner/fsf-src/bug/gcc/tree-ssanames.c:207
#3  0x0000000010542640 in delete_update_ssa () at
/home/meissner/fsf-src/bug/gcc/tree-into-ssa.c:2793
#4  0x0000000010691c64 in slpeel_tree_peel_loop_to_edge (loop=<value optimized
out>, e=<value optimized out>, first_niters=0xfffb693aef8,
niters=0xfffb693aad8, update_first_loop_count=<value optimized out>, th=0, 
    check_profitability=86 'V', cond_expr=<value optimized out>,
cond_expr_stmt_list=0x0) at
/home/meissner/fsf-src/bug/gcc/tree-vect-loop-manip.c:1456
#5  0x0000000010691f44 in vect_do_peeling_for_alignment (loop_vinfo=0x10ecfa40)
at /home/meissner/fsf-src/bug/gcc/tree-vect-loop-manip.c:2189
#6  0x0000000010686dc8 in vect_transform_loop (loop_vinfo=0x10ecfa40) at
/home/meissner/fsf-src/bug/gcc/tree-vect-loop.c:4677
#7  0x000000001069be78 in vectorize_loops () at
/home/meissner/fsf-src/bug/gcc/tree-vectorizer.c:205
#8  0x00000000105febec in tree_vectorize () at
/home/meissner/fsf-src/bug/gcc/tree-ssa-loop.c:220
#9  0x0000000010417468 in execute_one_pass (pass=0x10d1e3d8) at
/home/meissner/fsf-src/bug/gcc/passes.c:1563
#10 0x0000000010417ab4 in execute_pass_list (pass=0x10d1e3d8) at
/home/meissner/fsf-src/bug/gcc/passes.c:1618
#11 0x0000000010417ae0 in execute_pass_list (pass=0x10d1e248) at
/home/meissner/fsf-src/bug/gcc/passes.c:1619
#12 0x0000000010417ae0 in execute_pass_list (pass=0x10d1dad0) at
/home/meissner/fsf-src/bug/gcc/passes.c:1619
#13 0x0000000010558490 in tree_rest_of_compilation (fndecl=0xfffb6879200) at
/home/meissner/fsf-src/bug/gcc/tree-optimize.c:422
#14 0x000000001075866c in cgraph_expand_function (node=0xfffb680c080) at
/home/meissner/fsf-src/bug/gcc/cgraphunit.c:1508
#15 0x000000001075bc48 in cgraph_expand_all_functions () at
/home/meissner/fsf-src/bug/gcc/cgraphunit.c:1567
#16 cgraph_optimize () at /home/meissner/fsf-src/bug/gcc/cgraphunit.c:1823
#17 0x000000001075c118 in cgraph_finalize_compilation_unit () at
/home/meissner/fsf-src/bug/gcc/cgraphunit.c:1031
#18 0x000000001009e3d8 in c_write_global_declarations () at
/home/meissner/fsf-src/bug/gcc/c-decl.c:9837
#19 0x00000000104e57cc in compile_file (argc=7, argv=0xfffffffe008) at
/home/meissner/fsf-src/bug/gcc/toplev.c:819
#20 do_compile (argc=7, argv=0xfffffffe008) at
/home/meissner/fsf-src/bug/gcc/toplev.c:2211
#21 toplev_main (argc=7, argv=0xfffffffe008) at
/home/meissner/fsf-src/bug/gcc/toplev.c:2274
#22 0x0000000010147720 in main (argc=<value optimized out>, argv=<value
optimized out>) at /home/meissner/fsf-src/bug/gcc/main.c:36
gdb) c
Continuing.

Breakpoint 2, internal_error (gmsgid=0x10cb8778 "%s") at
/home/meissner/fsf-src/bug/gcc/diagnostic.c:838
838       diagnostic_set_info (&diagnostic, gmsgid, &ap, input_location,
DK_ICE);
(gdb) c
Continuing.
pp.i: In function ‘Perl_pp_complement’:
pp.i:8514:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


The ChangeLog for the change was:

2010-11-26  Michael Matz  <matz@suse.de>

       * tree-ssa-copy.c (fini_copy_prop): Don't DCE when we have loops.

       * passes.c (init_optimization_passes): Remove superfluous
       copy-prop pass.

I'm attaching a stripped down .i of the Perl_pp_complement function which has
the error.


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

* [Bug regression/46931] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
@ 2010-12-14  6:00 ` hjl.tools at gmail dot com
  2010-12-14  8:05 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-14  6:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-14 05:59:50 UTC ---
It may be related to PR 46834.


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

* [Bug regression/46931] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
  2010-12-14  6:00 ` [Bug regression/46931] " hjl.tools at gmail dot com
@ 2010-12-14  8:05 ` jakub at gcc dot gnu.org
  2010-12-16 14:15 ` [Bug regression/46931] [4.6 Regression] " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-14  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-14 08:04:54 UTC ---
I think the actual problem was introduced in PR46172 commit, with the addition
of remove_dead_stmts_from_loop, as we now DCE what we have created during the
vectorization.
This function gsi_removes a stmt and then calls release_defs, which does
nothing though, because the SSA_NAME is name_registered_for_update_p, so the
release of it is deferred.  But when delete_update_ssa attempts to release the
SSANAME afterwards, the bb for the stmt is already NULL and so gsi_for_stmt
fails.

Not sure if there is something wrong on the remove_dead_stmts_from_loop side,
or if just releasing what has been created in the same pass has never been done
before and we should make insert_debug_temp_for_var_def do nothing if
gsi is NULL and def_stmt has NULL gimple_bb and the RHS isn't a constant.


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

* [Bug regression/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
  2010-12-14  6:00 ` [Bug regression/46931] " hjl.tools at gmail dot com
  2010-12-14  8:05 ` jakub at gcc dot gnu.org
@ 2010-12-16 14:15 ` rguenth at gcc dot gnu.org
  2010-12-16 17:21 ` aoliva at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-16 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.6.0
            Summary|Subversion id 167184 breaks |[4.6 Regression] Subversion
                   |building perlbench on       |id 167184 breaks building
                   |power7 with debug           |perlbench on power7 with
                   |                            |debug
           Severity|major                       |normal

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-16 14:15:02 UTC ---
(In reply to comment #2)
> I think the actual problem was introduced in PR46172 commit, with the addition
> of remove_dead_stmts_from_loop, as we now DCE what we have created during the
> vectorization.
> This function gsi_removes a stmt and then calls release_defs, which does
> nothing though, because the SSA_NAME is name_registered_for_update_p, so the
> release of it is deferred.  But when delete_update_ssa attempts to release the
> SSANAME afterwards, the bb for the stmt is already NULL and so gsi_for_stmt
> fails.
> 
> Not sure if there is something wrong on the remove_dead_stmts_from_loop side,
> or if just releasing what has been created in the same pass has never been done
> before and we should make insert_debug_temp_for_var_def do nothing if
> gsi is NULL and def_stmt has NULL gimple_bb and the RHS isn't a constant.

Hmm.  We definitely shouldn't insert debug stmts for stmts that are no longer
in the insn stream...


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

* [Bug regression/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-12-16 14:15 ` [Bug regression/46931] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2010-12-16 17:21 ` aoliva at gcc dot gnu.org
  2010-12-17  6:15 ` aoliva at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2010-12-16 17:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2010-12-16 17:20:22 UTC ---
I agree.  For the sake of avoiding loss of debug info, I suggest we check that
the SSA name is not referenced in debug stmts before dropping the def
altogether.  Want me to code that up?


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

* [Bug regression/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-12-16 17:21 ` aoliva at gcc dot gnu.org
@ 2010-12-17  6:15 ` aoliva at gcc dot gnu.org
  2010-12-17  6:23 ` aoliva at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2010-12-17  6:15 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |aoliva at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2010-12-17 06:14:40 UTC ---
Mine.  I found out it would indeed drop debug info, and found out a way to
avoid discarding it.


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

* [Bug regression/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-12-17  6:15 ` aoliva at gcc dot gnu.org
@ 2010-12-17  6:23 ` aoliva at gcc dot gnu.org
  2010-12-28 20:21 ` [Bug debug/46931] " aoliva at gcc dot gnu.org
  2010-12-28 21:01 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2010-12-17  6:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2010-12-17 06:23:19 UTC ---
Created attachment 22793
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22793
Patch I'm testing that fixes the bug

Instead of just dropping the debug info on the floor, I figured we could
preserve the RHS of the removed DEF, if unchanging, in the debug stmts
themselves, if this wouldn't create invalid RHS for the debug bind, or in debug
temps bound just before the using debug stmts otherwise.


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

* [Bug debug/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-12-17  6:23 ` aoliva at gcc dot gnu.org
@ 2010-12-28 20:21 ` aoliva at gcc dot gnu.org
  2010-12-28 21:01 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2010-12-28 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2010-12-28 20:20:32 UTC ---
Author: aoliva
Date: Tue Dec 28 20:20:29 2010
New Revision: 168299

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168299
Log:
PR debug/46931
* tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Update
SSA before removing dead stmts.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-loop-manip.c


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

* [Bug debug/46931] [4.6 Regression] Subversion id 167184 breaks building perlbench on power7 with debug
  2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2010-12-28 20:21 ` [Bug debug/46931] " aoliva at gcc dot gnu.org
@ 2010-12-28 21:01 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-28 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-28 21:01:08 UTC ---
Fixed.


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

end of thread, other threads:[~2010-12-28 21:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-13 22:54 [Bug regression/46931] New: Subversion id 167184 breaks building perlbench on power7 with debug meissner at gcc dot gnu.org
2010-12-14  6:00 ` [Bug regression/46931] " hjl.tools at gmail dot com
2010-12-14  8:05 ` jakub at gcc dot gnu.org
2010-12-16 14:15 ` [Bug regression/46931] [4.6 Regression] " rguenth at gcc dot gnu.org
2010-12-16 17:21 ` aoliva at gcc dot gnu.org
2010-12-17  6:15 ` aoliva at gcc dot gnu.org
2010-12-17  6:23 ` aoliva at gcc dot gnu.org
2010-12-28 20:21 ` [Bug debug/46931] " aoliva at gcc dot gnu.org
2010-12-28 21:01 ` jakub at gcc dot gnu.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).