public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/44810]  New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
@ 2010-07-04 14:15 danglin at gcc dot gnu dot org
  2010-07-04 15:00 ` [Bug c++/44810] " rguenth at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-07-04 14:15 UTC (permalink / raw)
  To: gcc-bugs

Executing on host: /test/gnu/gcc/objdir/gcc/testsuite/g++/../../g++
-B/test/gnu/
gcc/objdir/gcc/testsuite/g++/../../
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/tortu
re/pr36745.C  -nostdinc++
-I/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v
3/include/hppa64-hp-hpux11.11
-I/test/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc
++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++
-I/test/gnu/gcc/gcc/lib
stdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/util
-fmes
sage-length=0  -O0  -O2 -fPIC  -S  -o pr36745.s    (timeout = 300)
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/torture/pr36745.C: In member function
'vo
id QRegExpEngine::addCatTransitions()':
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/torture/pr36745.C:20:35: error: output
nu
mber 0 not directly addressable
compiler exited with status 1
output is:
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/torture/pr36745.C: In member function
'vo
id QRegExpEngine::addCatTransitions()':
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/torture/pr36745.C:20:35: error: output
nu
mber 0 not directly addressable

FAIL: g++.dg/torture/pr36745.C  -O0  (test for excess errors)
Excess errors:
/test/gnu/gcc/gcc/gcc/testsuite/g++.dg/torture/pr36745.C:20:35: error: output
nu
mber 0 not directly addressable


-- 
           Summary: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
@ 2010-07-04 15:00 ` rguenth at gcc dot gnu dot org
  2010-07-06 16:18 ` mikpe at it dot uu dot se
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-04 15:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-07-04 15:00 -------
I have analyzed this already.  The problem is that

struct QMapData
{
  QBasicAtomicInt ref;
  static QMapData shared_null;
};

the static QMapData shared_null has DECL_ALIGN of 8 bits.  So we end up passing
an unaligned shared_null.ref._q_value as operand to

  __asm__ ("": "=m" (_q_value): :);

which doesn't work.

This is exposed by the mem-ref2 merge as previously we did not see the
shared_null decl (and thus its bogus alignment) here but instead referenced
via a pointer which got proper natural alignment from its type.

Thus, this is a C++ frontend bug.

CCing Jason.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
          Component|inline-asm                  |c++
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-04 15:00:43
               date|                            |
   Target Milestone|---                         |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
  2010-07-04 15:00 ` [Bug c++/44810] " rguenth at gcc dot gnu dot org
@ 2010-07-06 16:18 ` mikpe at it dot uu dot se
  2010-07-13 15:15 ` uweigand at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mikpe at it dot uu dot se @ 2010-07-06 16:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mikpe at it dot uu dot se  2010-07-06 16:17 -------
This new FAIL of pr36745.C since r161655 is also seen on sparc64, ia64, arm,
and alpha.


-- 

mikpe at it dot uu dot se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
  2010-07-04 15:00 ` [Bug c++/44810] " rguenth at gcc dot gnu dot org
  2010-07-06 16:18 ` mikpe at it dot uu dot se
@ 2010-07-13 15:15 ` uweigand at gcc dot gnu dot org
  2010-07-13 21:23 ` jason at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2010-07-13 15:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from uweigand at gcc dot gnu dot org  2010-07-13 15:15 -------
Also fails on spu-elf.


-- 

uweigand at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uweigand at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-07-13 15:15 ` uweigand at gcc dot gnu dot org
@ 2010-07-13 21:23 ` jason at gcc dot gnu dot org
  2010-07-13 21:51 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-07-13 21:23 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-07-04 15:00:43         |2010-07-13 21:23:08
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-07-13 21:23 ` jason at gcc dot gnu dot org
@ 2010-07-13 21:51 ` jason at gcc dot gnu dot org
  2010-07-14  8:42 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-07-13 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-07-13 21:51 ` jason at gcc dot gnu dot org
@ 2010-07-14  8:42 ` rguenth at gcc dot gnu dot org
  2010-07-14 16:40 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-14  8:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-07-14 08:42 -------
Yeah, it looks like so.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2010-07-14  8:42 ` rguenth at gcc dot gnu dot org
@ 2010-07-14 16:40 ` jason at gcc dot gnu dot org
  2010-07-14 17:01 ` jason at gcc dot gnu dot org
  2010-07-14 17:02 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-07-14 16:40 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-07-13 21:23:08         |2010-07-14 16:39:52
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2010-07-14 16:40 ` jason at gcc dot gnu dot org
@ 2010-07-14 17:01 ` jason at gcc dot gnu dot org
  2010-07-14 17:02 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-07-14 17:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2010-07-14 17:01 -------
Subject: Bug 44810

Author: jason
Date: Wed Jul 14 17:01:15 2010
New Revision: 162189

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162189
Log:
        PR c++/44810
        * g++.dg/torture/pr36745.C: Avoid undefined behavior.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/torture/pr36745.C


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C
  2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2010-07-14 17:01 ` jason at gcc dot gnu dot org
@ 2010-07-14 17:02 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-07-14 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2010-07-14 17:02 -------
Fixed testcase.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44810


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-14 17:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-04 14:15 [Bug inline-asm/44810] New: [4.6 Regression] FAIL: g++.dg/torture/pr36745.C danglin at gcc dot gnu dot org
2010-07-04 15:00 ` [Bug c++/44810] " rguenth at gcc dot gnu dot org
2010-07-06 16:18 ` mikpe at it dot uu dot se
2010-07-13 15:15 ` uweigand at gcc dot gnu dot org
2010-07-13 21:23 ` jason at gcc dot gnu dot org
2010-07-13 21:51 ` jason at gcc dot gnu dot org
2010-07-14  8:42 ` rguenth at gcc dot gnu dot org
2010-07-14 16:40 ` jason at gcc dot gnu dot org
2010-07-14 17:01 ` jason at gcc dot gnu dot org
2010-07-14 17:02 ` jason at gcc dot gnu dot org

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).