Bug 702984

Summary: spurious warning: dereferencing pointer ‘pretmp.811’ does break strict-aliasing rules
Product: Red Hat Enterprise Linux 6 Reporter: Thomas Sondergaard <thomas>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0CC: haneyd, patrickm
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-15 13:25:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Small example that demonstrates the problem
none
Preprocessor output none

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.