public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53651] New: seg fault when specifying using decltype(...)::method
@ 2012-06-13  1:17 dlarimer at gmail dot com
  2012-06-13 10:01 ` [Bug c++/53651] [4.7/4.8 Regression] [C++11] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dlarimer at gmail dot com @ 2012-06-13  1:17 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53651
           Summary: seg fault when specifying using decltype(...)::method
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dlarimer@gmail.com


Created attachment 27613
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27613
Source file that generated the error.

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin11/4.7.0/lto-wrapper
Target: x86_64-apple-darwin11
Configured with: ../gcc-4.7.0/configure --prefix=/opt/local
--build=x86_64-apple-darwin11
--enable-languages=c,c++,objc,obj-c++,lto,fortran,java
--libdir=/opt/local/lib/gcc47 --includedir=/opt/local/include/gcc47
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl
--enable-stage1-checking --disable-multilib --enable-lto
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--with-pkgversion='MacPorts gcc47 4.7.0_3'
Thread model: posix
gcc version 4.7.0 (MacPorts gcc47 4.7.0_3) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.7.4' '-v' '-save-temps' '-o' 'v5'
'-std=c++11' '-shared-libgcc' '-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin11/4.7.0/cc1plus -E -quiet -v
-D__DYNAMIC__ value5.cpp -fPIC -mmacosx-version-min=10.7.4 -mtune=core2
-std=c++11 -fpch-preprocess -o value5.ii
ignoring nonexistent directory
"/opt/local/lib/gcc47/gcc/x86_64-apple-darwin11/4.7.0/../../../../../x86_64-apple-darwin11/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/local/include/gcc47/c++/
 /opt/local/include/gcc47/c++//x86_64-apple-darwin11
 /opt/local/include/gcc47/c++//backward
 /opt/local/lib/gcc47/gcc/x86_64-apple-darwin11/4.7.0/include
 /opt/local/include
 /opt/local/lib/gcc47/gcc/x86_64-apple-darwin11/4.7.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.7.4' '-v' '-save-temps' '-o' 'v5'
'-std=c++11' '-shared-libgcc' '-mtune=core2'
 /opt/local/libexec/gcc/x86_64-apple-darwin11/4.7.0/cc1plus -fpreprocessed
value5.ii -fPIC -quiet -dumpbase value5.cpp -mmacosx-version-min=10.7.4
-mtune=core2 -auxbase value5 -std=c++11 -version -o value5.s
GNU C++ (MacPorts gcc47 4.7.0_3) version 4.7.0 (x86_64-apple-darwin11)
    compiled by GNU C version 4.7.0, GMP version 5.0.4, MPFR version 3.1.0-p3,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (MacPorts gcc47 4.7.0_3) version 4.7.0 (x86_64-apple-darwin11)
    compiled by GNU C version 4.7.0, GMP version 5.0.4, MPFR version 3.1.0-p3,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e694c643a962d7980e49500e9a4c6aa5
value5.cpp:38:76: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://trac.macports.org/newticket> for instructions


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

* [Bug c++/53651] [4.7/4.8 Regression] [C++11] seg fault when specifying using decltype(...)::method
  2012-06-13  1:17 [Bug c++/53651] New: seg fault when specifying using decltype(...)::method dlarimer at gmail dot com
@ 2012-06-13 10:01 ` redi at gcc dot gnu.org
  2012-06-13 14:31 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2012-06-13 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-06-13
      Known to work|                            |4.6.3
            Summary|seg fault when specifying   |[4.7/4.8 Regression]
                   |using decltype(...)::method |[C++11] seg fault when
                   |                            |specifying using
                   |                            |decltype(...)::method
     Ever Confirmed|0                           |1
      Known to fail|                            |4.7.0, 4.8.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-13 10:01:11 UTC ---
The code is has about a dozen errors, the one that causes the ICE is that the
decltype-specifier is a reference not a class, and you can't derive from a
reference.

Reduced:

template<typename> struct wrap { void bar(); };

template<typename T> auto foo(T* t) -> wrap<T>* { return 0; }

template<typename T>
struct holder : decltype(*foo((T*)0))
{
    using decltype(*foo((T*)0))::bar;
};

holder<int> h;


This is a regression because 4.6.3 doesn't ICE, although the diagnostic isn't
very helpful in telling you the decltype-specifier is a reference type:

s2.cc:8:11: error: expected nested-name-specifier before ‘decltype’
s2.cc:8:11: error: expected unqualified-id before ‘decltype’
s2.cc:8:11: error: expected ‘;’ before ‘decltype’
s2.cc:8:34: error: invalid use of ‘::’


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

* [Bug c++/53651] [4.7/4.8 Regression] [C++11] seg fault when specifying using decltype(...)::method
  2012-06-13  1:17 [Bug c++/53651] New: seg fault when specifying using decltype(...)::method dlarimer at gmail dot com
  2012-06-13 10:01 ` [Bug c++/53651] [4.7/4.8 Regression] [C++11] " redi at gcc dot gnu.org
@ 2012-06-13 14:31 ` hjl.tools at gmail dot com
  2012-06-15  0:26 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2012-06-13 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com
   Target Milestone|---                         |4.7.2

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-06-13 14:30:45 UTC ---
It is caused by revision 176513:

http://gcc.gnu.org/ml/gcc-cvs/2011-07/msg00780.html


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

* [Bug c++/53651] [4.7/4.8 Regression] [C++11] seg fault when specifying using decltype(...)::method
  2012-06-13  1:17 [Bug c++/53651] New: seg fault when specifying using decltype(...)::method dlarimer at gmail dot com
  2012-06-13 10:01 ` [Bug c++/53651] [4.7/4.8 Regression] [C++11] " redi at gcc dot gnu.org
  2012-06-13 14:31 ` hjl.tools at gmail dot com
@ 2012-06-15  0:26 ` jason at gcc dot gnu.org
  2012-06-20  1:18 ` jason at gcc dot gnu.org
  2012-06-22  0:36 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-15  0:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/53651] [4.7/4.8 Regression] [C++11] seg fault when specifying using decltype(...)::method
  2012-06-13  1:17 [Bug c++/53651] New: seg fault when specifying using decltype(...)::method dlarimer at gmail dot com
                   ` (2 preceding siblings ...)
  2012-06-15  0:26 ` jason at gcc dot gnu.org
@ 2012-06-20  1:18 ` jason at gcc dot gnu.org
  2012-06-22  0:36 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-20  1:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-20 01:18:03 UTC ---
Author: jason
Date: Wed Jun 20 01:17:59 2012
New Revision: 188807

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188807
Log:
    PR c++/53651
    * name-lookup.c (constructor_name_p): Don't try to look at the
    name of a DECLTYPE_TYPE.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype37.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/53651] [4.7/4.8 Regression] [C++11] seg fault when specifying using decltype(...)::method
  2012-06-13  1:17 [Bug c++/53651] New: seg fault when specifying using decltype(...)::method dlarimer at gmail dot com
                   ` (3 preceding siblings ...)
  2012-06-20  1:18 ` jason at gcc dot gnu.org
@ 2012-06-22  0:36 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-06-22  0:36 UTC (permalink / raw)
  To: gcc-bugs

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

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-06-20 07:22:39 UTC ---
Author: jason
Date: Wed Jun 20 07:22:34 2012
New Revision: 188813

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188813
Log:
    PR c++/53651
    * name-lookup.c (constructor_name_p): Don't try to look at the
    name of a DECLTYPE_TYPE.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/decltype37.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/name-lookup.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-06-22 00:35:48 UTC ---
Fixed for 4.7.2.


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

end of thread, other threads:[~2012-06-22  0:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13  1:17 [Bug c++/53651] New: seg fault when specifying using decltype(...)::method dlarimer at gmail dot com
2012-06-13 10:01 ` [Bug c++/53651] [4.7/4.8 Regression] [C++11] " redi at gcc dot gnu.org
2012-06-13 14:31 ` hjl.tools at gmail dot com
2012-06-15  0:26 ` jason at gcc dot gnu.org
2012-06-20  1:18 ` jason at gcc dot gnu.org
2012-06-22  0:36 ` 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).