This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2010 21:51:35 -0000
- Subject: [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
- References: <bug-44810-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jason at gcc dot gnu dot org 2010-07-13 21:51 -------
I disagree with the analysis. In fact, QMapData::shared_null correctly gets
32-bit DECL_ALIGN once we walk the pending_statics vector in
finish_record_layout. But this is irrelevant.
The problem is that at the point of the error we're trying to use
&QVectorData::shared_null, which properly has 8-bit alignment, as a
QVectorTypedData*. This seems to be a problem with the testcase: the QVector
constructor first initializes the p member of the anonymous union with
&QVectorData::shared_null and then tries to access the ref member of the d
member of the anonymous union, but that memory access would spill off the end
of the actual referent of the pointer.
Do you agree that the problem is that the testcase is undefined?
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
AssignedTo|jason at gcc dot gnu dot org|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810