public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
@ 2010-12-10 1:12 zsojka at seznam dot cz
2010-12-10 13:25 ` [Bug tree-optimization/46879] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-10 1:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Summary: [4.6 Regression] ICE: in
separate_decls_in_region_debug_bind, at
tree-parloops.c:778 with -flto
-ftree-parallelize-loops -gdwarf-3
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 22700
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22700
reduced testcase
Compiler output:
$ gcc -O -flto -ftree-parallelize-loops=4 -gdwarf-3 pr46879.c
In file included from :0:0:
pr46879.c: In function 'main':
pr46879.c:18:5: internal compiler error: in
separate_decls_in_region_debug_bind, at tree-parloops.c:778
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper:
/mnt/svn/gcc-trunk/binary-167643-lto-fortran-checking-yes-rtl-df/bin/gcc
returned 1 exit status
collect2: lto-wrapper returned 1 exit status
Tested revisions:
r167643 - crash
r165699 - crash
r161659 - OK
4.5 r166509 - OK
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
@ 2010-12-10 13:25 ` rguenth at gcc dot gnu.org
2010-12-10 14:59 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-10 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|lto |tree-optimization
Target Milestone|--- |4.6.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
2010-12-10 13:25 ` [Bug tree-optimization/46879] " rguenth at gcc dot gnu.org
@ 2010-12-10 14:59 ` jakub at gcc dot gnu.org
2010-12-10 15:21 ` 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-10 14:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-10 14:59:22 UTC ---
This looks like a lto bug to me.
1765 tree *basep = &op;
1766 while (handled_component_p (*basep))
1767 basep = &TREE_OPERAND (*basep, 0);
1768 if (TREE_CODE (*basep) == VAR_DECL
1769 && !auto_var_in_fn_p (*basep, current_function_decl))
1770 {
1771 bool volatilep = TREE_THIS_VOLATILE (*basep);
1772 *basep = build2 (MEM_REF, TREE_TYPE (*basep),
1773 build_fold_addr_expr (*basep),
1774 build_int_cst (build_pointer_type
1775 (TREE_TYPE (*basep)), 0));
1776 TREE_THIS_VOLATILE (*basep) = volatilep;
1777 }
in output_gimple_stmt is not suitable for the first argument of a GIMPLE_DEBUG
stmt - where the argument must be a DECL.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
2010-12-10 13:25 ` [Bug tree-optimization/46879] " rguenth at gcc dot gnu.org
2010-12-10 14:59 ` jakub at gcc dot gnu.org
@ 2010-12-10 15:21 ` rguenth at gcc dot gnu.org
2010-12-10 15:32 ` jakub 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-10 15:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-10 15:21:28 UTC ---
(In reply to comment #1)
> This looks like a lto bug to me.
> 1765 tree *basep = &op;
> 1766 while (handled_component_p (*basep))
> 1767 basep = &TREE_OPERAND (*basep, 0);
> 1768 if (TREE_CODE (*basep) == VAR_DECL
> 1769 && !auto_var_in_fn_p (*basep, current_function_decl))
> 1770 {
> 1771 bool volatilep = TREE_THIS_VOLATILE (*basep);
> 1772 *basep = build2 (MEM_REF, TREE_TYPE (*basep),
> 1773 build_fold_addr_expr (*basep),
> 1774 build_int_cst (build_pointer_type
> 1775 (TREE_TYPE (*basep)), 0));
> 1776 TREE_THIS_VOLATILE (*basep) = volatilep;
> 1777 }
>
> in output_gimple_stmt is not suitable for the first argument of a GIMPLE_DEBUG
> stmt - where the argument must be a DECL.
Hm, well. Then the debug machinery has to deal with type mismatches I guess.
But I wonder why we have debug-stmts for global variables anyway? I thought
they are only used for registers.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-12-10 15:21 ` rguenth at gcc dot gnu.org
@ 2010-12-10 15:32 ` jakub at gcc dot gnu.org
2010-12-10 15:58 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-10 15:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-10 15:32:40 UTC ---
(In reply to comment #2)
> Hm, well. Then the debug machinery has to deal with type mismatches I guess.
Well, all the debug machinery cares is that the var has the original, declared
type.
> But I wonder why we have debug-stmts for global variables anyway? I thought
> they are only used for registers.
It is not a global variable, it is a VAR_DECL with DECL_ABSTRACT_ORIGIN
PARM_DECL in bar, i.e. optimized away parameter/automatic variable. It is a
non-localized var in main, because it is never referenced there, except for
GIMPLE_DEBUG.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
` (3 preceding siblings ...)
2010-12-10 15:32 ` jakub at gcc dot gnu.org
@ 2010-12-10 15:58 ` rguenth at gcc dot gnu.org
2010-12-13 11:05 ` [Bug lto/46879] " jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-10 15:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.10 15:58:39
Ever Confirmed|0 |1
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-10 15:58:39 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > Hm, well. Then the debug machinery has to deal with type mismatches I guess.
>
> Well, all the debug machinery cares is that the var has the original, declared
> type.
>
> > But I wonder why we have debug-stmts for global variables anyway? I thought
> > they are only used for registers.
>
> It is not a global variable, it is a VAR_DECL with DECL_ABSTRACT_ORIGIN
> PARM_DECL in bar, i.e. optimized away parameter/automatic variable. It is a
> non-localized var in main, because it is never referenced there, except for
> GIMPLE_DEBUG.
Ah, ok. The fix is then to amend the
1768 if (TREE_CODE (*basep) == VAR_DECL
1769 && !auto_var_in_fn_p (*basep, current_function_decl))
check properly. The easiest check would be && !is_gimple_debug, or
a auto_var_in_fn_p variant without a specific function, thus auto_var_p.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
` (4 preceding siblings ...)
2010-12-10 15:58 ` rguenth at gcc dot gnu.org
@ 2010-12-13 11:05 ` jakub at gcc dot gnu.org
2010-12-13 17:37 ` jakub at gcc dot gnu.org
2010-12-13 17:41 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-13 11:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-13 11:04:58 UTC ---
Patch posted: http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00911.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
` (5 preceding siblings ...)
2010-12-13 11:05 ` [Bug lto/46879] " jakub at gcc dot gnu.org
@ 2010-12-13 17:37 ` jakub at gcc dot gnu.org
2010-12-13 17:41 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-13 17:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-13 17:37:27 UTC ---
Author: jakub
Date: Mon Dec 13 17:37:20 2010
New Revision: 167755
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167755
Log:
PR lto/46879
* lto-streamer-out.c (output_gimple_stmt): Never replace first
GIMPLE_DEBUG argument with MEM_REF.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-out.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
` (6 preceding siblings ...)
2010-12-13 17:37 ` jakub at gcc dot gnu.org
@ 2010-12-13 17:41 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-13 17:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-13 17:41:24 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-12-13 17:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 1:12 [Bug lto/46879] New: [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 zsojka at seznam dot cz
2010-12-10 13:25 ` [Bug tree-optimization/46879] " rguenth at gcc dot gnu.org
2010-12-10 14:59 ` jakub at gcc dot gnu.org
2010-12-10 15:21 ` rguenth at gcc dot gnu.org
2010-12-10 15:32 ` jakub at gcc dot gnu.org
2010-12-10 15:58 ` rguenth at gcc dot gnu.org
2010-12-13 11:05 ` [Bug lto/46879] " jakub at gcc dot gnu.org
2010-12-13 17:37 ` jakub at gcc dot gnu.org
2010-12-13 17:41 ` 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).