public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "simonjcan at yahoo dot co dot uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/21151] New: ICE when compiling c++ PCH of class definition within template function.
Date: Thu, 21 Apr 2005 14:25:00 -0000	[thread overview]
Message-ID: <20050421142508.21151.simonjcan@yahoo.co.uk> (raw)

Place the following code in a header file 'code.h' and compile a precompiled  
header with 'g++-4.0 -c code.h':   
template<typename T> void func()   
{   
	class object   
	{   
	public:   
		object() {} // Any function declaration produces an ICE.   
	};   
}   
   
code.h: In function 'void func()':   
code.h:6: internal compiler error: Segmentation fault   
Please submit a full bug report,   
with preprocessed source if appropriate.   
See <URL:http://gcc.gnu.org/bugs.html> for instructions.   
   
Compiling the code via 'g++-4.0 -c code.cpp' with 'code.cpp' containing the 
single line:   
#include "code.h"   
   
succeeds without error.    
gcc-3.4.3 does not exhibit this bug.   
  
I'm using 4.0.0 20050410 (prerelease) with Debian unstable on an Athlon-XP,  
gcc was configured as:   
../gcc-4.0.0-20050410/configure --enable-languages=c,c++   
--prefix=/usr/local/compilers --program-suffix=-4.0

-- 
           Summary: ICE when compiling c++ PCH of class definition within
                    template function.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: simonjcan at yahoo dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


             reply	other threads:[~2005-04-21 14:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21 14:25 simonjcan at yahoo dot co dot uk [this message]
2005-04-21 14:37 ` [Bug c++/21151] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-01 13:47 ` nathan at gcc dot gnu dot org
2005-06-02  8:54 ` cvs-commit at gcc dot gnu dot org
2005-06-02  8:58 ` nathan at gcc dot gnu dot org
2005-06-02  9:00 ` cvs-commit at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050421142508.21151.simonjcan@yahoo.co.uk \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).