public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13970] New: internal compiler error: Segmentation fault
@ 2004-02-02  0:15 gianni at mariani dot ws
  2004-02-02  0:45 ` [Bug c++/13970] " giovannibajo at libero dot it
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gianni at mariani dot ws @ 2004-02-02  0:15 UTC (permalink / raw)
  To: gcc-bugs

3.4 compiler dies on malformed input.

Reading specs from
/home/gianni/downloads/gcc/gcc-3.4-20040121-install/bin/../lib/gcc/i386-redhat-linux/3.4.0/specs
Configured with: ../gcc-3.4-20040121/configure
--prefix=/home/gianni/downloads/gcc/gcc-3.4-20040121-build/../gcc-3.4-20040121-install
--enable-shared --enable-threads=posix --disable-checking
--host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.4.0 20040121 (prerelease)


g++  -Wreturn-type -W -Wpointer-arith -pipe -ggdb3 -fcheck-new -fPIC 
-D_POSIX_THREADS -D_POSIX_$
gccbug_13808.cpp:30: internal compiler error: Segmentation fault

struct X
{
    struct C { int x; };
    class Z { Z(int){} };

    template<typename T,  typename A, template<typename,typename> class C>
    C<T, A> Func()
    {
        return C<T, A>();
    }

    template< typename Z > Z Zunc()
    {
        return Z();
    }

    template< typename Z > void Zinc()
    {
//        X::Z();
    }

    void tst()
    {
        Zunc<int>();

        Zinc<int>( //);
//    }

};

-- 
           Summary: internal compiler error: Segmentation fault
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gianni at mariani dot ws
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/13970] internal compiler error: Segmentation fault
  2004-02-02  0:15 [Bug c++/13970] New: internal compiler error: Segmentation fault gianni at mariani dot ws
@ 2004-02-02  0:45 ` giovannibajo at libero dot it
  2004-02-02  4:24 ` [Bug c++/13970] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-02  0:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-02-02 00:45 -------
Yes. Backtrace is:

#0  _cpp_lex_direct (pfile=0x8607ab8) at ../../gcc/gcc/cpplex.c:817
#1  0x084abddc in _cpp_lex_token (pfile=0x8607ab8)
    at ../../gcc/gcc/cpplex.c:710
#2  0x084ac947 in cpp_get_token (pfile=0x8607ab8)
    at ../../gcc/gcc/cppmacro.c:1061
#3  0x081cd8ae in get_nonpadding_token () at ../../gcc/gcc/c-lex.c:319
#4  0x081ccc73 in c_lex_with_flags (value=0x40219c74, cpp_flags=0x40219c72 "")
    at ../../gcc/gcc/c-lex.c:334
#5  0x08110d5b in cp_lexer_get_preprocessor_token (lexer=0x40285dc0,
    token=0x40219c70) at ../../gcc/gcc/cp/parser.c:602
#6  0x08110b13 in cp_lexer_read_token (lexer=0x40285dc0)
    at ../../gcc/gcc/cp/parser.c:492

Maybe a problem in the lexer?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-02 00:45:58
               date|                            |


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


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

* [Bug c++/13970] [3.4/3.5 Regression] internal compiler error: Segmentation fault
  2004-02-02  0:15 [Bug c++/13970] New: internal compiler error: Segmentation fault gianni at mariani dot ws
  2004-02-02  0:45 ` [Bug c++/13970] " giovannibajo at libero dot it
@ 2004-02-02  4:24 ` pinskia at gcc dot gnu dot org
  2004-02-03 20:00 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02  4:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-02 04:24 -------
At this point buffer (aka pfile->buffer) is NULL, why I do not know.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
      Known to work|3.2.3                       |3.2.3 3.3.1
            Summary|internal compiler error:    |[3.4/3.5 Regression]
                   |Segmentation fault          |internal compiler error:
                   |                            |Segmentation fault
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/13970] [3.4/3.5 Regression] internal compiler error: Segmentation fault
  2004-02-02  0:15 [Bug c++/13970] New: internal compiler error: Segmentation fault gianni at mariani dot ws
  2004-02-02  0:45 ` [Bug c++/13970] " giovannibajo at libero dot it
  2004-02-02  4:24 ` [Bug c++/13970] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-02-03 20:00 ` cvs-commit at gcc dot gnu dot org
  2004-02-03 20:04 ` cvs-commit at gcc dot gnu dot org
  2004-02-03 20:07 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-03 20:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-03 20:00 -------
Subject: Bug 13970

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-02-03 20:00:47

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog parser.c 
Added files:
	gcc/testsuite/g++.dg/template: lookup4.C 
	gcc/testsuite/g++.dg/parse: error14.C 

Log message:
	PR c++/13950
	* parser.c (cp_parser_class_name): Robustify.
	
	PR c++/13970
	* parser.c (cp_parser_cache_group): Do not consume the EOF token.
	
	PR c++/13950
	* g++.dg/template/lookup4.C: New test.
	
	PR c++/13970
	* g++.dg/parse/error14.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3459&r2=1.3460
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3927&r2=1.3928
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.166&r2=1.167
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/lookup4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error14.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/13970] [3.4/3.5 Regression] internal compiler error: Segmentation fault
  2004-02-02  0:15 [Bug c++/13970] New: internal compiler error: Segmentation fault gianni at mariani dot ws
                   ` (2 preceding siblings ...)
  2004-02-03 20:00 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-03 20:04 ` cvs-commit at gcc dot gnu dot org
  2004-02-03 20:07 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-03 20:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-03 20:04 -------
Subject: Bug 13970

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-02-03 20:04:36

Modified files:
	gcc/cp         : ChangeLog parser.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: error14.C 
	gcc/testsuite/g++.dg/template: lookup4.C 

Log message:
	PR c++/13950
	* parser.c (cp_parser_class_name): Robustify.
	
	PR c++/13970
	* parser.c (cp_parser_cache_group): Do not consume the EOF token.
	
	PR c++/13950
	* g++.dg/template/lookup4.C: New test.
	
	PR c++/13970
	* g++.dg/parse/error14.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.31&r2=1.3892.2.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.8&r2=1.157.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.47&r2=1.3389.2.48
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error14.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/lookup4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/13970] [3.4/3.5 Regression] internal compiler error: Segmentation fault
  2004-02-02  0:15 [Bug c++/13970] New: internal compiler error: Segmentation fault gianni at mariani dot ws
                   ` (3 preceding siblings ...)
  2004-02-03 20:04 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-03 20:07 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-03 20:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-02-03 20:07 -------
Fixed in GCC 3.4.

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


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


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

end of thread, other threads:[~2004-02-03 20:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-02  0:15 [Bug c++/13970] New: internal compiler error: Segmentation fault gianni at mariani dot ws
2004-02-02  0:45 ` [Bug c++/13970] " giovannibajo at libero dot it
2004-02-02  4:24 ` [Bug c++/13970] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-03 20:00 ` cvs-commit at gcc dot gnu dot org
2004-02-03 20:04 ` cvs-commit at gcc dot gnu dot org
2004-02-03 20:07 ` mmitchel 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).