public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11855] New: aliasing problem
@ 2003-08-08 14:12 fabdouze at caramail dot com
2003-08-08 14:41 ` [Bug optimization/11855] " falk at debian dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: fabdouze at caramail dot com @ 2003-08-08 14:12 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11855
Summary: aliasing problem
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fabdouze at caramail dot com
CC: gcc-bugs at gcc dot gnu dot org
I have the following code
typedef struct _LSPESn
{
struct _LSPESn *esnext; /* next ES neighbour in LSP chain */
X esdefm; /* ES neighbour default metric */
X esdlym; /* ES neighbour delay metric */
X esexpm; /* ES neighbour expense metric */
X eserrm; /* ES neighbour error metric */
X esid[LGSYSID]; /* ES neighbour system ID */
} LSPESnT, *LSPESnTp;
typedef struct STC
{
struct STC *stnext ;
}
ST, *STp;
LSPESnTp es2, esn;
for ( esn = ent->lspesn ; 0!=esn ; esn = es2 )
{
es2 = esn->esnext;
(((STp)( (STp)esn ))->stnext) = ( &(((SATenTp)( E2Ispp ))->sat_i2i. fr
eeLspESn ) )->prp_first;
( & (((SATenTp)( E2Ispp ))->sat_i2i.reeLspESn ) )->prp_first = ((STp)(
(STp)esn )); ;
}
It causes an infinit loop when compiling with -O2 option.
Apperently, gcc considere esn->esnext and (((STp)( (STp)esn ))->stnext) as
two different memory area and skip es2 in the generated library.
Isn't it a gcc bug?
It seems to be the same case than in bug 9902. But I do not see
which aliasing rules is not respected.
Thanks,
Fabien
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug optimization/11855] aliasing problem
2003-08-08 14:12 [Bug optimization/11855] New: aliasing problem fabdouze at caramail dot com
@ 2003-08-08 14:41 ` falk at debian dot org
2005-06-05 8:27 ` [Bug rtl-optimization/11855] " pinskia at gcc dot gnu dot org
2005-06-05 8:27 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: falk at debian dot org @ 2003-08-08 14:41 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11855
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From falk at debian dot org 2003-08-08 14:41 -------
There is only one:
"An object shall have its stored value accessed only by an lvalue
expression that has one of the following types:
-- a type compatible with the effective type of the object,
-- a qualified version of a type compatible with the effective type of the object,
-- a type that is the signed or unsigned type corresponding to the
effective type of the object,
-- a type that is the signed or unsigned type corresponding to a
qualified version of the effective type of the object,
-- an aggregate or union type that includes one of the aforementioned
types among its members (including, recursively, a member of a
subaggregate or contained union), or
-- a character type."
and this is exactly the one you are violating, since you're accessing struct
_LSPESn as STC.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/11855] aliasing problem
2003-08-08 14:12 [Bug optimization/11855] New: aliasing problem fabdouze at caramail dot com
2003-08-08 14:41 ` [Bug optimization/11855] " falk at debian dot org
2005-06-05 8:27 ` [Bug rtl-optimization/11855] " pinskia at gcc dot gnu dot org
@ 2005-06-05 8:27 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 8:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 08:27 -------
Reopening to ...
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11855
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug rtl-optimization/11855] aliasing problem
2003-08-08 14:12 [Bug optimization/11855] New: aliasing problem fabdouze at caramail dot com
2003-08-08 14:41 ` [Bug optimization/11855] " falk at debian dot org
@ 2005-06-05 8:27 ` pinskia at gcc dot gnu dot org
2005-06-05 8:27 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 8:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 08:27 -------
Mark as a dup of bug 21920.
*** This bug has been marked as a duplicate of 21920 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11855
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-06-05 8:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 14:12 [Bug optimization/11855] New: aliasing problem fabdouze at caramail dot com
2003-08-08 14:41 ` [Bug optimization/11855] " falk at debian dot org
2005-06-05 8:27 ` [Bug rtl-optimization/11855] " pinskia at gcc dot gnu dot org
2005-06-05 8:27 ` pinskia 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).