public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used
@ 2004-04-19 15:55 pinskia at gcc dot gnu dot org
2004-04-19 15:58 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-19 15:55 UTC (permalink / raw)
To: gcc-bugs
Try to run the following code -O1 or above, you will either get a link error or an as error:
int a;
int
main()
{
l1:
a= &&l1-&&l2;
return 0;
l2:;
}
I first reported it here: <http://gcc.gnu.org/ml/gcc/2004-04/msg00556.html> but the
descussion went into wrong direction, I just wantted to know if someone had noticed this
before.
--
Summary: [tree-ssa] [regression] labels after are removed even
though they are used
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [tree-ssa] [regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
@ 2004-04-19 15:58 ` pinskia at gcc dot gnu dot org
2004-04-19 16:25 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-19 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-19 15:42 -------
I forgot to say that converting to CFG based IR is causing this failure.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [tree-ssa] [regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
2004-04-19 15:58 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
@ 2004-04-19 16:25 ` pinskia at gcc dot gnu dot org
2004-04-19 17:25 ` bangerth at dealii dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-19 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-19 15:55 -------
This is causes all of the regressions on powerpc-apple-darwin which do not show up on
anyother target.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [tree-ssa] [regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
2004-04-19 15:58 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
2004-04-19 16:25 ` pinskia at gcc dot gnu dot org
@ 2004-04-19 17:25 ` bangerth at dealii dot org
2004-04-20 0:03 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-04-19 17:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-04-19 16:03 -------
Confirmed. With out address-of-label extension, this code is
definitely valid. Interestingly, I get a linker error for
a label "L3" :-)
g/x> /home/bangerth/bin/gcc-tree-ssa/bin/gcc -O1 x.c
/tmp/cclM7GY7.o(.text+0x12): In function `main':
: undefined reference to `.L3'
collect2: ld returned 1 exit status
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-04-19 16:03:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [tree-ssa] [regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-04-19 17:25 ` bangerth at dealii dot org
@ 2004-04-20 0:03 ` pinskia at gcc dot gnu dot org
2004-05-04 12:05 ` steven at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-20 0:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-19 22:50 -------
Here is some information, the main problem is that BB 1 is not being marked as
reachable, so it is being removed, we need to mark it as reachable some how.
;; basic block 0, loop depth 0, count 0
;; prev block -1, next block 1
;; pred: ENTRY (fallthru)
;; succ: EXIT
l1:;
l1.0 = (int)&l1;
l2.1 = (int)&l2;
T.2 = l1.0 - l2.1;
a = T.2;
return 0;
$22 = (struct basic_block_def *) 0x4152007c
(gdb) p debug_bb_n(1)
;; basic block 1, loop depth 0, count 0
;; prev block 0, next block -2
;; pred:
;; succ: EXIT
l2:;
return;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [tree-ssa] [regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-04-20 0:03 ` pinskia at gcc dot gnu dot org
@ 2004-05-04 12:05 ` steven at gcc dot gnu dot org
2004-06-08 13:50 ` [Bug rtl-optimization/15014] [3.5 regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-05-04 12:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-05-04 12:05 -------
Tree SSA produces the following .s file at -O:
.L2:
movl $.L2, %eax
movl $.L3, %edx
subl %edx, %eax
movl %eax, a(%rip)
movl $0, %eax
ret
And obviously the problem is that .L3 is never defined.
What are the semantics of this test case, is it allowed
to move the label around to another place? GCC 3.3.1
clearly does, and it produces this (also at -O):
.L2:
leal .L2(%rip), %eax
leal .L3(%rip), %edx
subl %edx, %eax
movl %eax, a(%rip)
.L3:
movl $0, %eax
ret
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-04-19 16:03:48 |2004-05-04 12:05:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug rtl-optimization/15014] [3.5 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-05-04 12:05 ` steven at gcc dot gnu dot org
@ 2004-06-08 13:50 ` pinskia at gcc dot gnu dot org
2004-06-20 20:37 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-08 13:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-08 13:49 -------
After RTH's change for having only one RETURN_EXPR, the problem is now on rtl level.
2004-06-07 Richard Henderson <rth@redhat.com>
* gimple-low.c (struct lower_data): Add the_return_label and
one_return_stmt.
(lower_function_body): Initialize and use them.
(lower_return_expr): New.
(lower_stmt): Call it.
* gimplify.c (gimplify_return_expr): Force the argument to be either
null or a result_decl.
* tree-gimple.c: Update gimple grammer to match.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Deny
coalescing of result_decls.
And here is the new test which fails:
#ifndef NO_LABEL_VALUES
int main ()
{
void *x = &&L2;
if (&&L3 - &&L1 > 1)
abort();
L1: return 0;
L2: abort ();
L3:;
}
#else
int main(){return 0;}
#endif
--
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |rtl-optimization
Last reconfirmed|2004-05-04 12:05:25 |2004-06-08 13:50:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [3.5 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-06-08 13:50 ` [Bug rtl-optimization/15014] [3.5 regression] " pinskia at gcc dot gnu dot org
@ 2004-06-20 20:37 ` pinskia at gcc dot gnu dot org
2004-10-04 14:29 ` [Bug middle-end/15014] [4.0 " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-20 20:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-20 20:37 -------
Now the orginal testcase fails now after some changes from RTH and at -O0 after CFG is always built
now.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Component|rtl-optimization |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-06-20 20:37 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
@ 2004-10-04 14:29 ` pinskia at gcc dot gnu dot org
2004-10-04 14:46 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 14:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 14:29 -------
Mine I will send it out soon.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-04 14:29 ` [Bug middle-end/15014] [4.0 " pinskia at gcc dot gnu dot org
@ 2004-10-04 14:46 ` pinskia at gcc dot gnu dot org
2004-10-07 17:19 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 14:46 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00246.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-10-04 14:46 ` pinskia at gcc dot gnu dot org
@ 2004-10-07 17:19 ` pinskia at gcc dot gnu dot org
2004-10-10 5:26 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-07 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-07 17:19 -------
Since Jeff says this is the wrong approach I am not going to update my patch because I have better
things to do with my time than fix cfgcleanup.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
Keywords|patch |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-10-07 17:19 ` pinskia at gcc dot gnu dot org
@ 2004-10-10 5:26 ` pinskia at gcc dot gnu dot org
2004-10-10 14:20 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10 5:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-10 05:26 -------
I have a new fix which should be more acceptable, testing right now.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-10-10 5:26 ` pinskia at gcc dot gnu dot org
@ 2004-10-10 14:20 ` pinskia at gcc dot gnu dot org
2004-10-10 17:53 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10 14:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-10 14:20 -------
Plus I am fixing up some of the tree optimizations for multiple entry point at the same time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-10-10 14:20 ` pinskia at gcc dot gnu dot org
@ 2004-10-10 17:53 ` pinskia at gcc dot gnu dot org
2004-10-18 19:30 ` pinskia at gcc dot gnu dot org
2004-10-18 19:30 ` cvs-commit at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-10 17:53 -------
Patch which fixes the problem and is a better fix than my first patch which does not work all ways:
<http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00860.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-10-10 17:53 ` pinskia at gcc dot gnu dot org
@ 2004-10-18 19:30 ` pinskia at gcc dot gnu dot org
2004-10-18 19:30 ` cvs-commit at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-18 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-18 19:30 -------
Fixed, since the testcases are already there, there is no need to apply any more.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/15014] [4.0 regression] labels after are removed even though they are used
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
` (13 preceding siblings ...)
2004-10-18 19:30 ` pinskia at gcc dot gnu dot org
@ 2004-10-18 19:30 ` cvs-commit at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-18 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-18 19:29 -------
Subject: Bug 15014
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-18 19:29:53
Modified files:
gcc : ChangeLog tree-cfg.c
Log message:
2004-10-18 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/15014
PR middle-end/16973
* tree-cfg.c (remove_bb): If we have a label expression in the
basic block and the label we have taken the address, move the
label expression to the basic block which is previous in the
linked list.
(tree_verify_flow_info): Fix printing out the label name of the
problematic label expression.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5932&r2=2.5933
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&r1=2.79&r2=2.80
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15014
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2004-10-18 19:30 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-19 15:55 [Bug middle-end/15014] New: [tree-ssa] [regression] labels after are removed even though they are used pinskia at gcc dot gnu dot org
2004-04-19 15:58 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
2004-04-19 16:25 ` pinskia at gcc dot gnu dot org
2004-04-19 17:25 ` bangerth at dealii dot org
2004-04-20 0:03 ` pinskia at gcc dot gnu dot org
2004-05-04 12:05 ` steven at gcc dot gnu dot org
2004-06-08 13:50 ` [Bug rtl-optimization/15014] [3.5 regression] " pinskia at gcc dot gnu dot org
2004-06-20 20:37 ` [Bug middle-end/15014] " pinskia at gcc dot gnu dot org
2004-10-04 14:29 ` [Bug middle-end/15014] [4.0 " pinskia at gcc dot gnu dot org
2004-10-04 14:46 ` pinskia at gcc dot gnu dot org
2004-10-07 17:19 ` pinskia at gcc dot gnu dot org
2004-10-10 5:26 ` pinskia at gcc dot gnu dot org
2004-10-10 14:20 ` pinskia at gcc dot gnu dot org
2004-10-10 17:53 ` pinskia at gcc dot gnu dot org
2004-10-18 19:30 ` pinskia at gcc dot gnu dot org
2004-10-18 19:30 ` cvs-commit 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).