public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/56646] New: ICE: in cp_parser_late_return_type_opt, at cp/parser.c:16970
@ 2013-03-18  0:41 pramodg at room77 dot com
  2013-03-18 11:26 ` [Bug c++/56646] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
  2013-03-20 12:10 ` jakub at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: pramodg at room77 dot com @ 2013-03-18  0:41 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56646
           Summary: ICE: in cp_parser_late_return_type_opt, at
                    cp/parser.c:16970
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pramodg@room77.com


Created attachment 29686
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29686
Preprocessed source

Return type resolution fails for functions inside a struct declared inside
other class Methods.

Tested on both g++4.7 (Debian 4.7.2-4) and g++ Snapshot (4.8.0 20130316)

$ /usr/lib/gcc-snapshot/bin/g++ -v -save-temps -Wall -Wextra -std=gnu++0x
abc.cc 
Using built-in specs.
COLLECT_GCC=/usr/lib/gcc-snapshot/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20130316-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-linker-build-id
--disable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-snap-amd64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-snap-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-snap-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64 --with-tune=generic --disable-werror
--enable-checking=yes --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.0 20130316 (experimental) [trunk revision 196694] (Debian
20130316-1) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wall' '-Wextra' '-std=gnu++11'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.8.0/cc1plus -E -quiet -v
-imultilib . -imultiarch x86_64-linux-gnu -D_GNU_SOURCE abc.cc -mtune=generic
-march=x86-64 -std=gnu++11 -Wall -Wextra -fpch-preprocess -o abc.ii
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.8.0/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.8.0/../../../../include/c++/4.8.0

/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-linux-gnu/.

/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
 /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.8.0/include
 /usr/local/include
 /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.8.0/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-Wall' '-Wextra' '-std=gnu++11'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.8.0/cc1plus
-fpreprocessed abc.ii -quiet -dumpbase abc.cc -mtune=generic -march=x86-64
-auxbase abc -Wall -Wextra -std=gnu++11 -version -o abc.s
GNU C++ (Debian 20130316-1) version 4.8.0 20130316 (experimental) [trunk
revision 196694] (x86_64-linux-gnu)
    compiled by GNU C version 4.8.0 20130316 (experimental) [trunk revision
196694], GMP version 5.0.5, MPFR version 3.1.1-p2, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (Debian 20130316-1) version 4.8.0 20130316 (experimental) [trunk
revision 196694] (x86_64-linux-gnu)
    compiled by GNU C version 4.8.0 20130316 (experimental) [trunk revision
196694], GMP version 5.0.5, MPFR version 3.1.1-p2, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 179a73a5a5f01088a1db5a487424c1fe
abc.cc: In member function 'void Foo::Func()':
abc.cc:23:16: internal compiler error: in cp_parser_late_return_type_opt, at
cp/parser.c:16970
     auto Bar() -> int {
                ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cc1Bz05T.out file, please attach this to
your bugreport.

-------------------------------------------------------
Source Code:
-------------------------------------------------------

void Func() {
  struct StructDeclaredInsideFunc {
    // This is OK.
    auto Bar() -> int {
      return 1;
    }
  };
}

class Foo {
  public:
  void Func();
};

void Foo::Func() {
  struct StructDeclaredInsideClassFunc {
    // Causes:
    // g++4.7 (Debian 4.7.2-4): internal compiler error: in
cp_parser_late_return_type_opt, at
    // cp/parser.c:16698
    // g++ Snapshot (4.8.0 20130316): internal compiler error: in
cp_parser_late_return_type_opt, at
    // cp/parser.c:16970
    auto Bar() -> int {
      return 1;
    }
  };
}

-------------------------------------------------------


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

* [Bug c++/56646] [4.7/4.8/4.9 Regression] ICE: in cp_parser_late_return_type_opt, at cp/parser.c:16970
  2013-03-18  0:41 [Bug libgcc/56646] New: ICE: in cp_parser_late_return_type_opt, at cp/parser.c:16970 pramodg at room77 dot com
@ 2013-03-18 11:26 ` rguenth at gcc dot gnu.org
  2013-03-20 12:10 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-03-18 11:26 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-03-18
          Component|libgcc                      |c++
      Known to work|                            |4.6.4
            Version|unknown                     |4.7.2
   Target Milestone|---                         |4.7.3
            Summary|ICE: in                     |[4.7/4.8/4.9 Regression]
                   |cp_parser_late_return_type_ |ICE: in
                   |opt, at cp/parser.c:16970   |cp_parser_late_return_type_
                   |                            |opt, at cp/parser.c:16970
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-18 11:26:26 UTC ---
Confirmed.  4.6 accepts the code.


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

* [Bug c++/56646] [4.7/4.8/4.9 Regression] ICE: in cp_parser_late_return_type_opt, at cp/parser.c:16970
  2013-03-18  0:41 [Bug libgcc/56646] New: ICE: in cp_parser_late_return_type_opt, at cp/parser.c:16970 pramodg at room77 dot com
  2013-03-18 11:26 ` [Bug c++/56646] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-03-20 12:10 ` jakub at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-20 12:10 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-20 12:10:17 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175671


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

end of thread, other threads:[~2013-03-20 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-18  0:41 [Bug libgcc/56646] New: ICE: in cp_parser_late_return_type_opt, at cp/parser.c:16970 pramodg at room77 dot com
2013-03-18 11:26 ` [Bug c++/56646] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-03-20 12:10 ` jakub 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).