public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back.
@ 2008-12-12 11:36 pluto at agmk dot net
2008-12-12 11:38 ` [Bug middle-end/38503] " pluto at agmk dot net
` (28 more replies)
0 siblings, 29 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2008-12-12 11:36 UTC (permalink / raw)
To: gcc-bugs
/local/devel/toolchain44/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ -dumpversion
4.4.0
/local/devel/toolchain44/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ -c -Wall -O2
-g0 -fPIC --save-temps \
-isystem ./buildenv/linux/gcc-4.4/64/boost-stlport-1.37.0/include \
bug.cpp
bug.cpp: In function 'void foo()':
bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
./buildenv/linux/gcc-4.4/64/boost-stlport-1.37.0/include/boost/optional/optional.hpp:315:
note: initialized from here
bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
./buildenv/linux/gcc-4.4/64/boost-stlport-1.37.0/include/boost/optional/optional.hpp:594:
note: initialized from here
on 4.3.2 it compiles cleanly.
--
Summary: [4.4 regression] warnings from -isystem headers strikes
back.
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC target triplet: x86_64-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
@ 2008-12-12 11:38 ` pluto at agmk dot net
2008-12-12 11:55 ` rguenth at gcc dot gnu dot org
` (27 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2008-12-12 11:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pluto at agmk dot net 2008-12-12 11:37 -------
Created an attachment (id=16897)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16897&action=view)
testcase.
to reproduce bug you also need the boost-1.37.0 headers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
2008-12-12 11:38 ` [Bug middle-end/38503] " pluto at agmk dot net
@ 2008-12-12 11:55 ` rguenth at gcc dot gnu dot org
2009-01-01 5:13 ` pinskia at gcc dot gnu dot org
` (26 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-12 11:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-12-12 11:53 -------
Related to/dup of PR38477. I'll leave this one for the system header issue
and PR38477 for the libstdc++/C++ alias problem.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
OtherBugsDependingO| |38477
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
2008-12-12 11:38 ` [Bug middle-end/38503] " pluto at agmk dot net
2008-12-12 11:55 ` rguenth at gcc dot gnu dot org
@ 2009-01-01 5:13 ` pinskia at gcc dot gnu dot org
2009-01-05 11:24 ` rguenth at gcc dot gnu dot org
` (25 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-01 5:13 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (2 preceding siblings ...)
2009-01-01 5:13 ` pinskia at gcc dot gnu dot org
@ 2009-01-05 11:24 ` rguenth at gcc dot gnu dot org
2009-01-09 10:25 ` jakub at gcc dot gnu dot org
` (24 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-05 11:24 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2009-01-05 11:24:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (3 preceding siblings ...)
2009-01-05 11:24 ` rguenth at gcc dot gnu dot org
@ 2009-01-09 10:25 ` jakub at gcc dot gnu dot org
2009-01-09 19:52 ` pluto at agmk dot net
` (23 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-01-09 10:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-01-09 10:25 -------
Please preprocess the testcase. Whether a header was a system header or not is
recorded in # <linenum> directives in the preprocessed output.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (4 preceding siblings ...)
2009-01-09 10:25 ` jakub at gcc dot gnu dot org
@ 2009-01-09 19:52 ` pluto at agmk dot net
2009-01-12 13:54 ` rguenth at gcc dot gnu dot org
` (22 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-01-09 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pluto at agmk dot net 2009-01-09 19:52 -------
Created an attachment (id=17067)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17067&action=view)
preprocessed testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (5 preceding siblings ...)
2009-01-09 19:52 ` pluto at agmk dot net
@ 2009-01-12 13:54 ` rguenth at gcc dot gnu dot org
2009-01-12 15:01 ` pluto at agmk dot net
` (21 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-12 13:54 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-01-12 13:54 -------
I can't seem to compile the preprocessed source:
In file included from ./sys-headers/boost/mpl/int.hpp:21,
from
./sys-headers/boost/type_traits/detail/template_arity_spec
.hpp:11,
from
./sys-headers/boost/type_traits/detail/bool_trait_def.hpp:
15,
from ./sys-headers/boost/type_traits/is_same.hpp:32,
from ./sys-headers/boost/type_traits/intrinsics.hpp:131,
from ./sys-headers/boost/type_traits/alignment_of.hpp:16,
from ./sys-headers/boost/optional/optional.hpp:22,
from ./sys-headers/boost/optional.hpp:16,
from bug.cpp:2:
./sys-headers/boost/mpl/aux_/integral_wrapper.hpp:43: error: expected
unqualifie
d-id before int
./sys-headers/boost/mpl/aux_/integral_wrapper.hpp:43: error: expected )
before
int
...
Note that the warning is from bug.cpp:6, not a system header anyway (the
_note_ is from a system header, do you want that to disappear?)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (6 preceding siblings ...)
2009-01-12 13:54 ` rguenth at gcc dot gnu dot org
@ 2009-01-12 15:01 ` pluto at agmk dot net
2009-01-12 15:11 ` pluto at agmk dot net
` (20 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-01-12 15:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pluto at agmk dot net 2009-01-12 15:01 -------
Created an attachment (id=17077)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17077&action=view)
full testcase (src + .ii + mkefile)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (7 preceding siblings ...)
2009-01-12 15:01 ` pluto at agmk dot net
@ 2009-01-12 15:11 ` pluto at agmk dot net
2009-01-12 15:16 ` rguenther at suse dot de
` (19 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-01-12 15:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pluto at agmk dot net 2009-01-12 15:10 -------
(In reply to comment #5)
> I can't seem to compile the preprocessed source:
i've attached a new full archive.
$ make
rm -f *.ii *.o *.s
/local/devel/toolchain44/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ -c -Wall -O2
-g0 -fPIC --save-temps -isystem ./sys-headers bug.cpp
bug.cpp: In function 'void foo()':
bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
./sys-headers/boost/optional/optional.hpp:315: note: initialized from here
bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
./sys-headers/boost/optional/optional.hpp:594: note: initialized from here
> Note that the warning is from bug.cpp:6, not a system header anyway
looks weird, because i can't see any dereferencing in bug.cpp:6
there's only trivial cctor which copies an enum.
for me it looks like the <warning> comes from boost::optional::
::aligned_storage::adress() manipulations inside boost system headers.
> (the _note_ is from a system header, do you want that to disappear?)
i want to disappear'em all :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (8 preceding siblings ...)
2009-01-12 15:11 ` pluto at agmk dot net
@ 2009-01-12 15:16 ` rguenther at suse dot de
2009-01-14 16:48 ` rguenth at gcc dot gnu dot org
` (18 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenther at suse dot de @ 2009-01-12 15:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenther at suse dot de 2009-01-12 15:16 -------
Subject: Re: [4.4 regression] warnings from -isystem
headers strikes back.
On Mon, 12 Jan 2009, pluto at agmk dot net wrote:
>
>
> ------- Comment #7 from pluto at agmk dot net 2009-01-12 15:10 -------
> (In reply to comment #5)
> > I can't seem to compile the preprocessed source:
>
> i've attached a new full archive.
>
> $ make
> rm -f *.ii *.o *.s
> /local/devel/toolchain44/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ -c -Wall -O2
> -g0 -fPIC --save-temps -isystem ./sys-headers bug.cpp
> bug.cpp: In function 'void foo()':
> bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
> strict-aliasing rules
> ./sys-headers/boost/optional/optional.hpp:315: note: initialized from here
> bug.cpp:6: warning: dereferencing pointer '<anonymous>' does break
> strict-aliasing rules
> ./sys-headers/boost/optional/optional.hpp:594: note: initialized from here
>
> > Note that the warning is from bug.cpp:6, not a system header anyway
>
> looks weird, because i can't see any dereferencing in bug.cpp:6
> there's only trivial cctor which copies an enum.
>
> for me it looks like the <warning> comes from boost::optional::
> ::aligned_storage::adress() manipulations inside boost system headers.
>
> > (the _note_ is from a system header, do you want that to disappear?)
>
> i want to disappear'em all :-)
Fair enough ;) The compiler just warns that in a second it will remove
that dereference (ok, only on the alias-improvements branch).
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (9 preceding siblings ...)
2009-01-12 15:16 ` rguenther at suse dot de
@ 2009-01-14 16:48 ` rguenth at gcc dot gnu dot org
2009-01-14 18:29 ` pluto at agmk dot net
` (17 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-14 16:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2009-01-14 16:48 -------
I just installed a fix - can you verify if all the annoying warnigns are gone?
Thx!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (10 preceding siblings ...)
2009-01-14 16:48 ` rguenth at gcc dot gnu dot org
@ 2009-01-14 18:29 ` pluto at agmk dot net
2009-01-14 20:50 ` rguenther at suse dot de
` (16 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-01-14 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pluto at agmk dot net 2009-01-14 18:29 -------
(In reply to comment #9)
> I just installed a fix - can you verify if all the annoying warnigns are gone?
> Thx!
>
they are still there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (11 preceding siblings ...)
2009-01-14 18:29 ` pluto at agmk dot net
@ 2009-01-14 20:50 ` rguenther at suse dot de
2009-01-23 16:53 ` rguenth at gcc dot gnu dot org
` (15 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenther at suse dot de @ 2009-01-14 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenther at suse dot de 2009-01-14 20:50 -------
Subject: Re: [4.4 regression] warnings from -isystem
headers strikes back.
On Wed, 14 Jan 2009, pluto at agmk dot net wrote:
> ------- Comment #10 from pluto at agmk dot net 2009-01-14 18:29 -------
> (In reply to comment #9)
> > I just installed a fix - can you verify if all the annoying warnigns are gone?
> > Thx!
> >
>
> they are still there.
Then they are either real bugs in the testcase or in PTA.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (12 preceding siblings ...)
2009-01-14 20:50 ` rguenther at suse dot de
@ 2009-01-23 16:53 ` rguenth at gcc dot gnu dot org
2009-01-24 15:56 ` rguenth at gcc dot gnu dot org
` (14 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-23 16:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2009-01-23 16:52 -------
this is placement-new related.
D.20941_8 = &ox
ox = { } no-tbaa-pruning
D.20941_8 = { ox }
alias warning for D.20941_8
After alias:
ox.D.20531.m_initialized = 0;
D.20941_8 = (struct X *) &ox.D.20531.m_storage.dummy_.data[0];
D.20941_8->e_ = 0;
ox.D.20531.m_initialized = 1;
D.20946_10 = ox.D.20531.m_initialized;
Before:
ox.D.20531.m_initialized ={v} 0;
<<<change_dynamic_type (struct X *) &ox.D.20531.m_storage.dummy_.data[0])>>>
D.20941_8 = (struct X *) &ox.D.20531.m_storage.dummy_.data[0];
D.20941_8->e_ ={v} 0;
ox.D.20531.m_initialized ={v} 1;
D.20946_10 = ox.D.20531.m_initialized;
so it looks like we do placement new on _parts_ of an object that
continues to live over that placement new.
Uh oh. Is this even legal?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (13 preceding siblings ...)
2009-01-23 16:53 ` rguenth at gcc dot gnu dot org
@ 2009-01-24 15:56 ` rguenth at gcc dot gnu dot org
2009-01-24 17:00 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 15:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2009-01-24 15:56 -------
Testcase:
inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }
struct Y {
Y() {}
int i;
};
struct X {
X() {}
void construct(const Y& y)
{
new (&m_data[0]) Y(y);
}
bool initialized;
char m_data[sizeof (Y)];
};
void bar(const X&);
void foo(Y& y)
{
X x;
x.construct(y);
x.initialized = true;
bar(x);
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Last reconfirmed|2009-01-05 11:24:29 |2009-01-24 15:56:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (14 preceding siblings ...)
2009-01-24 15:56 ` rguenth at gcc dot gnu dot org
@ 2009-01-24 17:00 ` rguenth at gcc dot gnu dot org
2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
` (12 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2009-01-24 17:00 -------
placement new handling is still completely broken. And of course unfixable
without severely pessimizing TBAA.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (16 preceding siblings ...)
2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
@ 2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 17:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2009-01-24 17:50 -------
Mine.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2009-01-24 15:56:04 |2009-01-24 17:50:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (15 preceding siblings ...)
2009-01-24 17:00 ` rguenth at gcc dot gnu dot org
@ 2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 17:50 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Priority|P2 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (18 preceding siblings ...)
2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
@ 2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
2009-01-30 17:32 ` hjl at gcc dot gnu dot org
` (8 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-27 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from rguenth at gcc dot gnu dot org 2009-01-27 10:43 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (17 preceding siblings ...)
2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
@ 2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-27 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from rguenth at gcc dot gnu dot org 2009-01-27 10:43 -------
Subject: Bug 38503
Author: rguenth
Date: Tue Jan 27 10:42:59 2009
New Revision: 143700
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143700
Log:
2009-01-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38503
* cfgexpand.c (expand_gimple_basic_block): Ignore
GIMPLE_CHANGE_DYNAMIC_TYPE during expansion.
* tree-ssa-structalias.c (set_uids_in_ptset): Do not prune
variables that cannot have TBAA applied.
(compute_points_to_sets): Do not remove GIMPLE_CHANGE_DYNAMIC_TYPE
statements.
* g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-structalias.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (19 preceding siblings ...)
2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
@ 2009-01-30 17:32 ` hjl at gcc dot gnu dot org
2009-02-02 8:55 ` pluto at agmk dot net
` (7 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-01-30 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from hjl at gcc dot gnu dot org 2009-01-30 17:32 -------
Subject: Bug 38503
Author: hjl
Date: Fri Jan 30 17:31:24 2009
New Revision: 143798
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143798
Log:
2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
2009-01-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38503
* g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C: New testcase.
2009-01-26 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38745
* g++.dg/torture/pr38745.C: New testcase.
2009-01-26 Richard Guenther <rguenther@suse.de>
PR middle-end/38851
* g++.dg/warn/Wuninitialized-1.C: New testcase.
2009-01-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
Richard Guenther <rguenther@suse.de>
PR tree-optimization/38747
PR tree-optimization/38748
* gcc.dg/tree-ssa/struct-aliasing-1.c: New test.
* gcc.c-torture/execute/struct-aliasing-1.c: Likewise.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/torture/pr38745.C
- copied unchanged from r143797,
trunk/gcc/testsuite/g++.dg/torture/pr38745.C
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C
- copied unchanged from r143797,
trunk/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/Wuninitialized-1.C
- copied unchanged from r143797,
trunk/gcc/testsuite/g++.dg/warn/Wuninitialized-1.C
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/struct-aliasing-1.c
- copied unchanged from r143797,
trunk/gcc/testsuite/gcc.c-torture/execute/struct-aliasing-1.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c
- copied unchanged from r143797,
trunk/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c
Modified:
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (20 preceding siblings ...)
2009-01-30 17:32 ` hjl at gcc dot gnu dot org
@ 2009-02-02 8:55 ` pluto at agmk dot net
2009-02-02 10:23 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-02-02 8:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from pluto at agmk dot net 2009-02-02 08:55 -------
(In reply to comment #16)
> Subject: Bug 38503
>
> Author: rguenth
> Date: Tue Jan 27 10:42:59 2009
> New Revision: 143700
this patch doesn't fix testcase that i found yesterday.
i found another testcase for gcc-4.4.0-20090130 not covered
by patch commited on january, the 27.
$ cat bug2.cpp
#include <boost/optional.hpp>
#include <string>
struct X
{
std::string s;
bool f;
};
extern boost::optional< X > x;
void foo( std::string const& );
bool bar()
{
if ( !x )
return false;
if ( x->f )
foo( x->s );
return false;
}
$ make
rm -f *.ii *.o *.s
/local/devel/toolchain44/x86_64-gnu-linux/bin/x86_64-gnu-linux-g++ -c -Wall -O2
-g0 -fPIC --save-temps -isystem ./sys-headers bug2.cpp
bug2.cpp: In function 'bool bar()':
bug2.cpp:14: warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
bug2.cpp:14: note: initialized from here
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (21 preceding siblings ...)
2009-02-02 8:55 ` pluto at agmk dot net
@ 2009-02-02 10:23 ` rguenth at gcc dot gnu dot org
2009-02-27 10:30 ` pluto at agmk dot net
` (5 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-02-02 10:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from rguenth at gcc dot gnu dot org 2009-02-02 10:23 -------
Same issue. Only possible fix is to not apply TBAA pruning to escaped
symbols, which will - well - basically disable TBAA. Testcase:
inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }
struct Y {
Y() {}
int i;
};
struct X {
X() {}
void construct(const Y& y)
{
new (&m_data[0]) Y(y);
}
template <class T>
Y& get() { return reinterpret_cast<Y&>(m_data); }
bool initialized;
char m_data[sizeof (Y)];
};
X x;
void bar(const X&);
void foo(Y& y)
{
x.get<Y>() = y;
x.initialized = true;
bar(x);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (22 preceding siblings ...)
2009-02-02 10:23 ` rguenth at gcc dot gnu dot org
@ 2009-02-27 10:30 ` pluto at agmk dot net
2009-02-27 10:33 ` rguenther at suse dot de
` (4 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-02-27 10:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from pluto at agmk dot net 2009-02-27 10:29 -------
(In reply to comment #20)
> Same issue. Only possible fix is to not apply TBAA pruning to escaped
> symbols, which will - well - basically disable TBAA. Testcase:
waht about this testcase?
the bug is marked as fixed but warnings are still present?
> inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }
>
> struct Y {
> Y() {}
> int i;
> };
>
> struct X {
> X() {}
> void construct(const Y& y)
> {
> new (&m_data[0]) Y(y);
> }
> template <class T>
> Y& get() { return reinterpret_cast<Y&>(m_data); }
> bool initialized;
> char m_data[sizeof (Y)];
> };
>
> X x;
>
> void bar(const X&);
> void foo(Y& y)
> {
> x.get<Y>() = y;
> x.initialized = true;
> bar(x);
> }
>
t.cpp: In member function 'Y& X::get() [with T = Y]':
t.cpp:25: instantiated from here
t.cpp:15: warning: dereferencing type-punned pointer will break strict-aliasing
rules
t.cpp: In function 'void foo(Y&)':
t.cpp:25: warning: dereferencing pointer '<anonymous>' does break
strict-aliasing rules
t.cpp:25: note: initialized from here
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (23 preceding siblings ...)
2009-02-27 10:30 ` pluto at agmk dot net
@ 2009-02-27 10:33 ` rguenther at suse dot de
2009-02-27 11:05 ` pluto at agmk dot net
` (3 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: rguenther at suse dot de @ 2009-02-27 10:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from rguenther at suse dot de 2009-02-27 10:33 -------
Subject: Re: [4.4 regression] warnings from -isystem
headers strikes back.
On Fri, 27 Feb 2009, pluto at agmk dot net wrote:
> ------- Comment #21 from pluto at agmk dot net 2009-02-27 10:29 -------
> (In reply to comment #20)
> > Same issue. Only possible fix is to not apply TBAA pruning to escaped
> > symbols, which will - well - basically disable TBAA. Testcase:
>
> waht about this testcase?
> the bug is marked as fixed but warnings are still present?
The original reported problem is gone. The testcase below is unfixable.
> > inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }
> >
> > struct Y {
> > Y() {}
> > int i;
> > };
> >
> > struct X {
> > X() {}
> > void construct(const Y& y)
> > {
> > new (&m_data[0]) Y(y);
> > }
> > template <class T>
> > Y& get() { return reinterpret_cast<Y&>(m_data); }
> > bool initialized;
> > char m_data[sizeof (Y)];
> > };
> >
> > X x;
> >
> > void bar(const X&);
> > void foo(Y& y)
> > {
> > x.get<Y>() = y;
> > x.initialized = true;
> > bar(x);
> > }
> >
>
> t.cpp: In member function 'Y& X::get() [with T = Y]':
> t.cpp:25: instantiated from here
> t.cpp:15: warning: dereferencing type-punned pointer will break strict-aliasing
> rules
> t.cpp: In function 'void foo(Y&)':
> t.cpp:25: warning: dereferencing pointer '<anonymous>' does break
> strict-aliasing rules
> t.cpp:25: note: initialized from here
>
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (24 preceding siblings ...)
2009-02-27 10:33 ` rguenther at suse dot de
@ 2009-02-27 11:05 ` pluto at agmk dot net
2009-02-27 11:07 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-02-27 11:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from pluto at agmk dot net 2009-02-27 11:04 -------
(In reply to comment #22)
> The original reported problem is gone. The testcase below is unfixable.
so what users can do now?
the -isystem feature doesn't work as expected with this unfixable diagnostics.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (25 preceding siblings ...)
2009-02-27 11:05 ` pluto at agmk dot net
@ 2009-02-27 11:07 ` rguenth at gcc dot gnu dot org
2009-02-27 11:22 ` pluto at agmk dot net
2009-02-27 12:04 ` rguenther at suse dot de
28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-02-27 11:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #24 from rguenth at gcc dot gnu dot org 2009-02-27 11:07 -------
The user can use -Wno-strict-aliasing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (26 preceding siblings ...)
2009-02-27 11:07 ` rguenth at gcc dot gnu dot org
@ 2009-02-27 11:22 ` pluto at agmk dot net
2009-02-27 12:04 ` rguenther at suse dot de
28 siblings, 0 replies; 30+ messages in thread
From: pluto at agmk dot net @ 2009-02-27 11:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #25 from pluto at agmk dot net 2009-02-27 11:22 -------
(In reply to comment #24)
> The user can use -Wno-strict-aliasing.
>
naturally, but -O2 turns on -fstrict-aliasing, so using strict-aliasing
without warnings about aliasing violations is a bit horrible :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
* [Bug middle-end/38503] [4.4 regression] warnings from -isystem headers strikes back.
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
` (27 preceding siblings ...)
2009-02-27 11:22 ` pluto at agmk dot net
@ 2009-02-27 12:04 ` rguenther at suse dot de
28 siblings, 0 replies; 30+ messages in thread
From: rguenther at suse dot de @ 2009-02-27 12:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #26 from rguenther at suse dot de 2009-02-27 12:04 -------
Subject: Re: [4.4 regression] warnings from -isystem
headers strikes back.
On Fri, 27 Feb 2009, pluto at agmk dot net wrote:
> ------- Comment #25 from pluto at agmk dot net 2009-02-27 11:22 -------
> (In reply to comment #24)
> > The user can use -Wno-strict-aliasing.
> >
>
> naturally, but -O2 turns on -fstrict-aliasing, so using strict-aliasing
> without warnings about aliasing violations is a bit horrible :)
On IRC we agreed that turning strict-aliasing warnings off for
system-headers is not a good idea.
So -Wno-strict-aliasing is the only thing I can offer.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38503
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2009-02-27 12:04 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-12 11:36 [Bug middle-end/38503] New: [4.4 regression] warnings from -isystem headers strikes back pluto at agmk dot net
2008-12-12 11:38 ` [Bug middle-end/38503] " pluto at agmk dot net
2008-12-12 11:55 ` rguenth at gcc dot gnu dot org
2009-01-01 5:13 ` pinskia at gcc dot gnu dot org
2009-01-05 11:24 ` rguenth at gcc dot gnu dot org
2009-01-09 10:25 ` jakub at gcc dot gnu dot org
2009-01-09 19:52 ` pluto at agmk dot net
2009-01-12 13:54 ` rguenth at gcc dot gnu dot org
2009-01-12 15:01 ` pluto at agmk dot net
2009-01-12 15:11 ` pluto at agmk dot net
2009-01-12 15:16 ` rguenther at suse dot de
2009-01-14 16:48 ` rguenth at gcc dot gnu dot org
2009-01-14 18:29 ` pluto at agmk dot net
2009-01-14 20:50 ` rguenther at suse dot de
2009-01-23 16:53 ` rguenth at gcc dot gnu dot org
2009-01-24 15:56 ` rguenth at gcc dot gnu dot org
2009-01-24 17:00 ` rguenth at gcc dot gnu dot org
2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
2009-01-24 17:50 ` rguenth at gcc dot gnu dot org
2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
2009-01-27 10:43 ` rguenth at gcc dot gnu dot org
2009-01-30 17:32 ` hjl at gcc dot gnu dot org
2009-02-02 8:55 ` pluto at agmk dot net
2009-02-02 10:23 ` rguenth at gcc dot gnu dot org
2009-02-27 10:30 ` pluto at agmk dot net
2009-02-27 10:33 ` rguenther at suse dot de
2009-02-27 11:05 ` pluto at agmk dot net
2009-02-27 11:07 ` rguenth at gcc dot gnu dot org
2009-02-27 11:22 ` pluto at agmk dot net
2009-02-27 12:04 ` rguenther at suse dot de
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).