public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
@ 2012-10-23 11:06 bruno-gcc at defraine dot net
  2012-10-23 11:08 ` [Bug c++/55032] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bruno-gcc at defraine dot net @ 2012-10-23 11:06 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55032
           Summary: [4.7 Regression] Internal compiler error: in
                    strip_typedefs, at cp/tree.c:1199
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bruno-gcc@defraine.net


Some variations of bug #53989 still seem to exist (or gcc 4.7.2 does not
contain a complete fix for that bug).

$ cat Test.cpp
template<typename T>
struct vec3t {
  T c[3];
};

typedef vec3t<float> vec3;

class Bounds {
  public:
    Bounds(const vec3 bb[2]);
    void foo(const vec3 & v) { v.c[0]; }
};

template<typename T>
void work(T& value);

void foo() {
  vec3 bb[2];
  work(bb);
}

$ g++ -Wall -c Test.cpp
Test.cpp: In member function 'void Bounds::foo(const vec3&)':
Test.cpp:11:38: warning: statement has no effect [-Wunused-value]
Test.cpp: In function 'void foo()':
Test.cpp:19:10: internal compiler error: in strip_typedefs, at cp/tree.c:1199
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/gcc-4.7.2/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/opt/gcc-4.7.2
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 4.7.2 (GCC)


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

* [Bug c++/55032] [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
@ 2012-10-23 11:08 ` rguenth at gcc dot gnu.org
  2012-10-24 14:06 ` [Bug c++/55032] [4.7/4.8 " paolo.carlini at oracle dot com
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-23 11:08 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.3


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
  2012-10-23 11:08 ` [Bug c++/55032] " rguenth at gcc dot gnu.org
@ 2012-10-24 14:06 ` paolo.carlini at oracle dot com
  2012-12-03 16:02 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-24 14:06 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-24
                 CC|                            |jason at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-24 14:05:53 UTC ---
Let's add Jason in CC about this. Besides PR53989, it seems also related to the
following PR54038.


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
  2012-10-23 11:08 ` [Bug c++/55032] " rguenth at gcc dot gnu.org
  2012-10-24 14:06 ` [Bug c++/55032] [4.7/4.8 " paolo.carlini at oracle dot com
@ 2012-12-03 16:02 ` rguenth at gcc dot gnu.org
  2012-12-05 21:38 ` jason at gcc dot gnu.org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-03 16:02 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (2 preceding siblings ...)
  2012-12-03 16:02 ` rguenth at gcc dot gnu.org
@ 2012-12-05 21:38 ` jason at gcc dot gnu.org
  2012-12-06 20:21 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-05 21:38 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (3 preceding siblings ...)
  2012-12-05 21:38 ` jason at gcc dot gnu.org
@ 2012-12-06 20:21 ` jason at gcc dot gnu.org
  2012-12-06 20:22 ` jason at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 20:21 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 20:20:46 UTC ---
Author: jason
Date: Thu Dec  6 20:20:34 2012
New Revision: 194265

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194265
Log:
    PR c++/55032
    * tree.c (build_array_type_1): Re-layout if we found it in the
    hash table.

Added:
    trunk/gcc/testsuite/g++.dg/template/array24.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree.c


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (4 preceding siblings ...)
  2012-12-06 20:21 ` jason at gcc dot gnu.org
@ 2012-12-06 20:22 ` jason at gcc dot gnu.org
  2012-12-06 20:23 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 20:22 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 20:21:44 UTC ---
Author: jason
Date: Thu Dec  6 20:21:29 2012
New Revision: 194268

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194268
Log:
    PR c++/55032
    * tree.c (build_array_type_1): Re-layout if we found it in the
    hash table.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/template/array24.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/tree.c


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (5 preceding siblings ...)
  2012-12-06 20:22 ` jason at gcc dot gnu.org
@ 2012-12-06 20:23 ` jason at gcc dot gnu.org
  2012-12-07  4:59 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 20:23 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 20:23:16 UTC ---
Fixed.


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (6 preceding siblings ...)
  2012-12-06 20:23 ` jason at gcc dot gnu.org
@ 2012-12-07  4:59 ` jason at gcc dot gnu.org
  2012-12-20  8:18 ` ppluzhnikov at google dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-07  4:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-07 04:58:56 UTC ---
Author: jason
Date: Fri Dec  7 04:58:45 2012
New Revision: 194286

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194286
Log:
    PR c++/55032
    * tree.c (build_array_type_1): Re-layout if we found it in the
    hash table.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/template/array24.C
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/tree.c


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (7 preceding siblings ...)
  2012-12-07  4:59 ` jason at gcc dot gnu.org
@ 2012-12-20  8:18 ` ppluzhnikov at google dot com
  2012-12-25  7:32 ` ppluzhnikov at google dot com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ppluzhnikov at google dot com @ 2012-12-20  8:18 UTC (permalink / raw)
  To: gcc-bugs


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

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppluzhnikov at google dot
                   |                            |com

--- Comment #6 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-12-20 08:18:27 UTC ---
FYI, when we picked up r194286 into google/gcc-4_7 branch, and ran our 500,000
validation tests, we discovered two instances of mis-compilation.

This code:

  typedef vector<void*> T[13];

  void foo() {
    T x;
    ...
  }

is mis-compiled to omit 13 calls to vector::vector, and x[0], x[1], etc. all
contain uninitialized stack garbage data members.

I've confirmed that trunk compiler is similarly broken.

Unfortunately I haven't been able to reduce the test case that exposes the
problem yet.


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (8 preceding siblings ...)
  2012-12-20  8:18 ` ppluzhnikov at google dot com
@ 2012-12-25  7:32 ` ppluzhnikov at google dot com
  2013-01-02 19:04 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ppluzhnikov at google dot com @ 2012-12-25  7:32 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-12-25 07:31:53 UTC ---
(In reply to comment #6)

> Unfortunately I haven't been able to reduce the test case that exposes the
> problem yet.

It took a whole week, but I finally have reduced test case in PR55804.


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (9 preceding siblings ...)
  2012-12-25  7:32 ` ppluzhnikov at google dot com
@ 2013-01-02 19:04 ` jason at gcc dot gnu.org
  2013-01-02 19:05 ` jason at gcc dot gnu.org
  2013-01-02 19:05 ` jason at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-02 19:04 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-02 19:03:19 UTC ---
Author: jason
Date: Wed Jan  2 19:03:04 2013
New Revision: 194811

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194811
Log:
    PR c++/55804
    PR c++/55032
    PR c++/55245
    * tree.c (build_array_type_1): Revert earlier change.
    * cp/tree.c (build_cplus_array_type): Copy layout information
    to main variant if necessary.

Added:
    trunk/gcc/testsuite/g++.dg/init/array33.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/tree.c


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (11 preceding siblings ...)
  2013-01-02 19:05 ` jason at gcc dot gnu.org
@ 2013-01-02 19:05 ` jason at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-02 19:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-02 19:03:55 UTC ---
Author: jason
Date: Wed Jan  2 19:03:37 2013
New Revision: 194812

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194812
Log:
    PR c++/55804
    PR c++/55032
    PR c++/55245
    * tree.c (build_array_type_1): Revert earlier change.
    * cp/tree.c (build_cplus_array_type): Copy layout information
    to main variant if necessary.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/init/array33.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/tree.c
    branches/gcc-4_7-branch/gcc/tree.c


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

* [Bug c++/55032] [4.7/4.8 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199
  2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
                   ` (10 preceding siblings ...)
  2013-01-02 19:04 ` jason at gcc dot gnu.org
@ 2013-01-02 19:05 ` jason at gcc dot gnu.org
  2013-01-02 19:05 ` jason at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-02 19:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-02 19:04:07 UTC ---
Author: jason
Date: Wed Jan  2 19:03:46 2013
New Revision: 194813

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194813
Log:
    PR c++/55804
    PR c++/55032
    PR c++/55245
    * tree.c (build_array_type_1): Revert earlier change.
    * cp/tree.c (build_cplus_array_type): Copy layout information
    to main variant if necessary.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/init/array33.C
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/tree.c
    branches/gcc-4_6-branch/gcc/tree.c


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

end of thread, other threads:[~2013-01-02 19:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 11:06 [Bug c++/55032] New: [4.7 Regression] Internal compiler error: in strip_typedefs, at cp/tree.c:1199 bruno-gcc at defraine dot net
2012-10-23 11:08 ` [Bug c++/55032] " rguenth at gcc dot gnu.org
2012-10-24 14:06 ` [Bug c++/55032] [4.7/4.8 " paolo.carlini at oracle dot com
2012-12-03 16:02 ` rguenth at gcc dot gnu.org
2012-12-05 21:38 ` jason at gcc dot gnu.org
2012-12-06 20:21 ` jason at gcc dot gnu.org
2012-12-06 20:22 ` jason at gcc dot gnu.org
2012-12-06 20:23 ` jason at gcc dot gnu.org
2012-12-07  4:59 ` jason at gcc dot gnu.org
2012-12-20  8:18 ` ppluzhnikov at google dot com
2012-12-25  7:32 ` ppluzhnikov at google dot com
2013-01-02 19:04 ` jason at gcc dot gnu.org
2013-01-02 19:05 ` jason at gcc dot gnu.org
2013-01-02 19:05 ` jason at gcc dot gnu.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).