public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41368] New: Erroneous aliasing rules violation messages are issued
@ 2009-09-16 5:11 yuri at tsoft dot com
2009-09-16 5:12 ` [Bug c++/41368] " yuri at tsoft dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: yuri at tsoft dot com @ 2009-09-16 5:11 UTC (permalink / raw)
To: gcc-bugs
When the attached testcase is compiled with gcc-4.4.1 there are two aliasing
error messages issued, that appear to be wrong.
--
Summary: Erroneous aliasing rules violation messages are issued
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41368
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/41368] Erroneous aliasing rules violation messages are issued
2009-09-16 5:11 [Bug c++/41368] New: Erroneous aliasing rules violation messages are issued yuri at tsoft dot com
@ 2009-09-16 5:12 ` yuri at tsoft dot com
2009-09-16 5:17 ` yuri at tsoft dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: yuri at tsoft dot com @ 2009-09-16 5:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from yuri at tsoft dot com 2009-09-16 05:12 -------
Created an attachment (id=18593)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18593&action=view)
testcase
command line: g++ -c -O5 -Wall pr.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41368
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/41368] Erroneous aliasing rules violation messages are issued
2009-09-16 5:11 [Bug c++/41368] New: Erroneous aliasing rules violation messages are issued yuri at tsoft dot com
2009-09-16 5:12 ` [Bug c++/41368] " yuri at tsoft dot com
@ 2009-09-16 5:17 ` yuri at tsoft dot com
2009-09-16 8:02 ` rguenth at gcc dot gnu dot org
2009-09-16 9:55 ` yuri at rawbw dot com
3 siblings, 0 replies; 5+ messages in thread
From: yuri at tsoft dot com @ 2009-09-16 5:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from yuri at tsoft dot com 2009-09-16 05:17 -------
gcc-4.3.1 didn't issue such warnings.
I wasn't able to minimize the testcase more.
Somehow if eee instance of Zzzzz is removed and just Fffff::bbb() is called
messages disappear. This is strange since code around lines in question is all
the same in both cases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41368
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/41368] Erroneous aliasing rules violation messages are issued
2009-09-16 5:11 [Bug c++/41368] New: Erroneous aliasing rules violation messages are issued yuri at tsoft dot com
2009-09-16 5:12 ` [Bug c++/41368] " yuri at tsoft dot com
2009-09-16 5:17 ` yuri at tsoft dot com
@ 2009-09-16 8:02 ` rguenth at gcc dot gnu dot org
2009-09-16 9:55 ` yuri at rawbw dot com
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-16 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-09-16 08:02 -------
The compiler warns for the store in
D.1845_1 = (struct Fffff *) &eee.llll[0];
D.1854_8 ={v} &0B->D.1740.rrrr[0];
D.1845_1->ppp1 = D.1854_8;
because that stores to eee.llll (type char) via a pointer to type Fffff which
is invalid.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41368
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/41368] Erroneous aliasing rules violation messages are issued
2009-09-16 5:11 [Bug c++/41368] New: Erroneous aliasing rules violation messages are issued yuri at tsoft dot com
` (2 preceding siblings ...)
2009-09-16 8:02 ` rguenth at gcc dot gnu dot org
@ 2009-09-16 9:55 ` yuri at rawbw dot com
3 siblings, 0 replies; 5+ messages in thread
From: yuri at rawbw dot com @ 2009-09-16 9:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from yuri at rawbw dot com 2009-09-16 09:55 -------
Subject: Re: Erroneous aliasing rules violation messages are
issued
rguenth at gcc dot gnu dot org wrote:
> ------- Comment #3 from rguenth at gcc dot gnu dot org 2009-09-16 08:02 -------
> The compiler warns for the store in
>
> D.1845_1 = (struct Fffff *) &eee.llll[0];
> D.1854_8 ={v} &0B->D.1740.rrrr[0];
> D.1845_1->ppp1 = D.1854_8;
>
> because that stores to eee.llll (type char) via a pointer to type Fffff which
> is invalid.
>
>
If this is the case, I agree with the warning, but why is it placed in
function 'bbb', and not in 'ggg'? 'ggg' is the one that converts from
unsigned char to Fffff.
I believe this is a bug that message is misplaced. This makes message
misleading and confusing.
Message line should be fixed, and also it should be one message, not two.
This case should be reopened.
Thank you,
Yuri
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41368
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-16 9:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 5:11 [Bug c++/41368] New: Erroneous aliasing rules violation messages are issued yuri at tsoft dot com
2009-09-16 5:12 ` [Bug c++/41368] " yuri at tsoft dot com
2009-09-16 5:17 ` yuri at tsoft dot com
2009-09-16 8:02 ` rguenth at gcc dot gnu dot org
2009-09-16 9:55 ` yuri at rawbw dot com
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).