Bug 702984 - spurious warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
Summary: spurious warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-08 20:32 UTC by Thomas Sondergaard
Modified: 2011-06-15 13:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-15 13:25:08 UTC
Target Upstream Version:


Attachments (Terms of Use)
Small example that demonstrates the problem (625 bytes, text/x-c++src)
2011-05-08 20:32 UTC, Thomas Sondergaard
no flags Details
Preprocessor output (866.10 KB, text/plain)
2011-05-10 19:56 UTC, Thomas Sondergaard
no flags Details

Description Thomas Sondergaard 2011-05-08 20:32:40 UTC
Created attachment 497678 [details]
Small example that demonstrates the problem

Description of problem:


Version-Release number of selected component (if applicable):
g++ (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)

How reproducible:
Everytime. Compile attached sample


Steps to Reproduce:
1. g++ -I /path/to/boost_1_46_1 -g -O2 -Wall -c tst.cc

Actual results:
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp: In function ‘std::vector<B, std::allocator<B> > f()’:
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp:346: warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
cc1plus: note: initialized from here
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp:346: warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
cc1plus: note: initialized from here
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp:346: warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
cc1plus: note: initialized from here
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp:346: warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
cc1plus: note: initialized from here
/home/ts/pack/boost_1_46_1/boost/optional/optional.hpp:346: warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
cc1plus: note: initialized from here


Expected results:
No warnings

Additional info:
Modifying the example a little bit in ways that seem irrelevant makes the problem go away. Found in real-use code which was subsequently reduced to the attached sample.

Comment 2 RHEL Program Management 2011-05-09 06:00:12 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Thomas Sondergaard 2011-05-09 21:02:59 UTC
(In reply to comment #2)
> Since RHEL 6.1 External Beta has begun, and this bug remains
> unresolved, it has been rejected as it is not proposed as
> exception or blocker.

Puzzling message. Rejected altogether or for 6.1? Should I file it upstream, ie gcc's own bugzilla?

Comment 4 Jakub Jelinek 2011-05-10 09:25:47 UTC
Please provide preprocessed source (g++ -O2 -I /path/to/boost_1_46_1 -E -o tst.ii tst.cc and attach tst.ii), I certainly can't reproduce it with boost 1.44.

Comment 5 Thomas Sondergaard 2011-05-10 19:56:45 UTC
Created attachment 498142 [details]
Preprocessor output

Generated with the following command line as requested in comment #4

g++ -O2 -I /home/ts/pack/boost_1_46_1z -E -o tst.iix tst.cc

Comment 7 RHEL Program Management 2011-06-15 13:25:08 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.