public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
@ 2010-07-09 10:41 ebotcazou at gcc dot gnu dot org
2010-07-09 11:42 ` [Bug middle-end/44885] " rguenth at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-09 10:41 UTC (permalink / raw)
To: gcc-bugs
There is a regression in gnat.dg visible on various 32-bit platforms:
http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00744.html
http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00743.html
http://gcc.gnu.org/ml/gcc-testresults/2010-07/msg00709.html
The problem is that the new code seems to overlook TYPE_NONALIASED_COMPONENT
when building the MEM_REF and thus gives the wrong alias set to the RTL mem,
causing aliasing memory references to be swapped by the scheduler.
--
Summary: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb
after mem-ref2
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ebotcazou at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
@ 2010-07-09 11:42 ` rguenth at gcc dot gnu dot org
2010-07-09 13:05 ` [Bug tree-optimization/44885] " ebotcazou at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-09 11:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-07-09 11:42 -------
Can you elaborate? The relevant type for the MEM_REF is always that of the
base object, which is either a dereference (thus, of sth addressable) or
a decl (which can't be non-aliased as well, no?).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
2010-07-09 11:42 ` [Bug middle-end/44885] " rguenth at gcc dot gnu dot org
@ 2010-07-09 13:05 ` ebotcazou at gcc dot gnu dot org
2010-07-09 13:23 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-09 13:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ebotcazou at gcc dot gnu dot org 2010-07-09 13:05 -------
> Can you elaborate? The relevant type for the MEM_REF is always that of the
> base object, which is either a dereference (thus, of sth addressable) or
> a decl (which can't be non-aliased as well, no?).
In 144t.optimized there is:
aliasing3_pkg__pointer.18_1->a[1]{lb: 1 sz: 4} = 5;
D.2290_6 = MEM[(integer *)&aliasing3_pkg__block].a[1]{lb: 1 sz: 4};
and the type (integer *) is wrong. But you're right, it's probably wrong
before since there is in 014t.veclower:
aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer;
aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5;
aliasing3_pkg.test (&aliasing3_pkg__block.a);
and in 022t.cleanup_cfg:
aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer;
aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5;
aliasing3_pkg.test.isra (&aliasing3_pkg__block.a[1]{lb: 1 sz: 4});
So it looks like IPA-SRA breaks TYPE_NONALIASED_COMPONENT here because it takes
the address of a non-aliased component.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
2010-07-09 11:42 ` [Bug middle-end/44885] " rguenth at gcc dot gnu dot org
2010-07-09 13:05 ` [Bug tree-optimization/44885] " ebotcazou at gcc dot gnu dot org
@ 2010-07-09 13:23 ` rguenth at gcc dot gnu dot org
2010-07-09 13:28 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-09 13:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-07-09 13:23 -------
Ah, that makes sense. Confirmed btw.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-07-09 13:23:31
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-07-09 13:23 ` rguenth at gcc dot gnu dot org
@ 2010-07-09 13:28 ` rguenth at gcc dot gnu dot org
2010-07-09 15:59 ` ebotcazou at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-09 13:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-07-09 13:28 -------
Btw, can we amend the stmt verifier to check that the address of such
a thing is not taken? I'm thinking of verify_expr here:
case ADDR_EXPR:
{
tree tem;
gcc_assert (is_gimple_address (t));
/* Skip any references (they will be checked when we recurse down the
tree) and ensure that any variable used as a prefix is marked
addressable. */
for (x = TREE_OPERAND (t, 0);
handled_component_p (x);
x = TREE_OPERAND (x, 0))
;
Eric, you probably know best what should be checked, can you prepare a patch
(that hopefully passes testing ... huh)?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-07-09 13:28 ` rguenth at gcc dot gnu dot org
@ 2010-07-09 15:59 ` ebotcazou at gcc dot gnu dot org
2010-07-09 16:01 ` rguenther at suse dot de
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-09 15:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ebotcazou at gcc dot gnu dot org 2010-07-09 15:59 -------
> Eric, you probably know best what should be checked, can you prepare a patch
> (that hopefully passes testing ... huh)?
Yes, will do, but not before addressing the issues caught by the new size check
on VIEW_CONVERT_EXPR. We have dozens of regressions in our internal testsuite.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-07-09 15:59 ` ebotcazou at gcc dot gnu dot org
@ 2010-07-09 16:01 ` rguenther at suse dot de
2010-07-09 16:15 ` ebotcazou at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenther at suse dot de @ 2010-07-09 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenther at suse dot de 2010-07-09 16:01 -------
Subject: Re: [4.6 regression] miscompilation
of gnat.dg/aliasing3.adb after mem-ref2
On Fri, 9 Jul 2010, ebotcazou at gcc dot gnu dot org wrote:
> ------- Comment #5 from ebotcazou at gcc dot gnu dot org 2010-07-09 15:59 -------
> > Eric, you probably know best what should be checked, can you prepare a patch
> > (that hopefully passes testing ... huh)?
>
> Yes, will do, but not before addressing the issues caught by the new size check
> on VIEW_CONVERT_EXPR. We have dozens of regressions in our internal testsuite.
Heh - and I specifically restricted it to registers to avoid that ... ;)
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-07-09 16:01 ` rguenther at suse dot de
@ 2010-07-09 16:15 ` ebotcazou at gcc dot gnu dot org
2010-07-28 8:17 ` ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-09 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ebotcazou at gcc dot gnu dot org 2010-07-09 16:14 -------
> Heh - and I specifically restricted it to registers to avoid that ... ;)
Yes, that was very kind of you. :-) But people do appalling things in Ada with
Unchecked_Conversion.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-07-09 16:15 ` ebotcazou at gcc dot gnu dot org
@ 2010-07-28 8:17 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:03 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:04 ` ebotcazou at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-28 8:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ebotcazou at gcc dot gnu dot org 2010-07-28 08:16 -------
Fixing.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2010-07-09 13:23:31 |2010-07-28 08:16:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-07-28 8:17 ` ebotcazou at gcc dot gnu dot org
@ 2010-07-28 10:03 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:04 ` ebotcazou at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-28 10:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ebotcazou at gcc dot gnu dot org 2010-07-28 10:03 -------
Subject: Bug 44885
Author: ebotcazou
Date: Wed Jul 28 10:03:00 2010
New Revision: 162621
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162621
Log:
PR tree-optimization/44885
* tree-sra.c (find_param_candidates): Skip pointer types to arrays
with non-aliased component.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-sra.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
` (8 preceding siblings ...)
2010-07-28 10:03 ` ebotcazou at gcc dot gnu dot org
@ 2010-07-28 10:04 ` ebotcazou at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2010-07-28 10:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ebotcazou at gcc dot gnu dot org 2010-07-28 10:04 -------
Schedule of variations:
unix/-m32
Running target unix/-m32
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/eric/svn/gcc/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running /home/eric/svn/gcc/gcc/testsuite/gnat.dg/dg.exp ...
Running /home/eric/svn/gcc/gcc/testsuite/gnat.dg/specs/specs.exp ...
Running /home/eric/svn/gcc/gcc/testsuite/gnat.dg/style/style.exp ...
=== gnat Summary ===
# of expected passes 815
# of expected failures 10
# of unsupported tests 4
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-07-28 10:04 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09 10:41 [Bug middle-end/44885] New: [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 ebotcazou at gcc dot gnu dot org
2010-07-09 11:42 ` [Bug middle-end/44885] " rguenth at gcc dot gnu dot org
2010-07-09 13:05 ` [Bug tree-optimization/44885] " ebotcazou at gcc dot gnu dot org
2010-07-09 13:23 ` rguenth at gcc dot gnu dot org
2010-07-09 13:28 ` rguenth at gcc dot gnu dot org
2010-07-09 15:59 ` ebotcazou at gcc dot gnu dot org
2010-07-09 16:01 ` rguenther at suse dot de
2010-07-09 16:15 ` ebotcazou at gcc dot gnu dot org
2010-07-28 8:17 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:03 ` ebotcazou at gcc dot gnu dot org
2010-07-28 10:04 ` ebotcazou 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).