public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14086] New: internal compiler error: Segmentation fault (enum name equals classname)
@ 2004-02-09 16:11 hans dot buchmann at fhso dot ch
  2004-02-09 16:20 ` [Bug c++/14086] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hans dot buchmann at fhso dot ch @ 2004-02-09 16:11 UTC (permalink / raw)
  To: gcc-bugs

compiling the code

-----------------------------------
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bug.cc"
struct ClassA
{
  ClassA();
};

struct ClassB
{
  enum Enum {ClassB};
  ClassA key;

           ClassB();
  virtual ~ClassB();
};


ClassB::ClassB()
{
}


with:
-----------------------------------
/home/buchmann/cvs/eo3s/htc/bin/g++ \
	-c -o util/lang/http-parser-bug.o \
	bug.cc

produces the output:
-----------------------------------

bug.cc:12: error: expected class-name before '(' token
bug.cc:7: error: duplicate field `struct ClassB' (as enum and non-enum)
bug.cc: In constructor `ClassB::ClassB()':
bug.cc:17: 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.

compiler version g++ -v:
-----------------------------------

Reading specs from
/home/buchmann/cvs/host/gcc-3.4/bin/../lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: /home/buchmann/cvs/dist/gcc-3.4-20040114/configure -v
--prefix=/home/buchmann/cvs/host/gcc-3.4/ --enable-languages=c,c++ --with-newlib
Thread model: posix
gcc version 3.4.0 20040114 (experimental)


Best regards
Hans Buchmann

-- 
           Summary: internal compiler error: Segmentation fault (enum name
                    equals classname)
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hans dot buchmann at fhso dot ch
                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=14086


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

* [Bug c++/14086] [3.3/3.4/3.5 Regression] internal compiler error: Segmentation fault (enum name equals classname)
  2004-02-09 16:11 [Bug c++/14086] New: internal compiler error: Segmentation fault (enum name equals classname) hans dot buchmann at fhso dot ch
@ 2004-02-09 16:20 ` pinskia at gcc dot gnu dot org
  2004-02-16  2:35 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-09 16:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-09 16:20 -------
Confirmed, a regression from 3.2.3.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |error-recovery, ice-on-
                   |                            |invalid-code
      Known to fail|                            |3.5.0 3.3.1 3.4.0 3.3.3
      Known to work|                            |3.2.3 3.2.2 3.0.4 2.95.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-09 16:20:34
               date|                            |
            Summary|internal compiler error:    |[3.3/3.4/3.5 Regression]
                   |Segmentation fault (enum    |internal compiler error:
                   |name equals classname)      |Segmentation fault (enum
                   |                            |name equals classname)
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/14086] [3.3/3.4/3.5 Regression] internal compiler error: Segmentation fault (enum name equals classname)
  2004-02-09 16:11 [Bug c++/14086] New: internal compiler error: Segmentation fault (enum name equals classname) hans dot buchmann at fhso dot ch
  2004-02-09 16:20 ` [Bug c++/14086] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-02-16  2:35 ` cvs-commit at gcc dot gnu dot org
  2004-02-16  3:09 ` cvs-commit at gcc dot gnu dot org
  2004-02-16  3:15 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-16  2:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-16 02:35 -------
Subject: Bug 14086

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-02-16 02:35:50

Modified files:
	gcc/cp         : ChangeLog call.c class.c decl.c name-lookup.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/expr: cond4.C 
	gcc/testsuite/g++.dg/lookup: crash2.C 

Log message:
	PR c++/13971
	* call.c (build_conditional_expr): Handle conversions between
	class types which result in differently cv-qualified type
	variants.
	
	PR c++/14086
	* class.c (delete_duplicate_fields_1): Remove.
	(delete_duplicate_fields): Likewise.
	(finish_struct_anon): Remove check for members with the same name
	as their enclosing class.
	(check_field_decls): Do not call duplicate_fields.
	* decl.c (grokdeclarator): Remove check for static data members
	with the same name as their enclosing class.
	* name-lookup.c (push_class_level_binding): Check for members with
	the same name as their enclosing class.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3957&r2=1.3958
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.462&r2=1.463
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.600&r2=1.601
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1185&r2=1.1186
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3503&r2=1.3504
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/cond4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/crash2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/14086] [3.3/3.4/3.5 Regression] internal compiler error: Segmentation fault (enum name equals classname)
  2004-02-09 16:11 [Bug c++/14086] New: internal compiler error: Segmentation fault (enum name equals classname) hans dot buchmann at fhso dot ch
  2004-02-09 16:20 ` [Bug c++/14086] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-02-16  2:35 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-16  3:09 ` cvs-commit at gcc dot gnu dot org
  2004-02-16  3:15 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-16  3:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-16 03:09 -------
Subject: Bug 14086

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-02-16 03:08:55

Modified files:
	gcc/cp         : ChangeLog call.c class.c decl.c name-lookup.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/expr: cond4.C 
	gcc/testsuite/g++.dg/lookup: crash2.C 

Log message:
	PR c++/13971
	* call.c (build_conditional_expr): Handle conversions between
	class types which result in differently cv-qualified type
	variants.
	
	PR c++/14086
	* class.c (delete_duplicate_fields_1): Remove.
	(delete_duplicate_fields): Likewise.
	(finish_struct_anon): Remove check for members with the same name
	as their enclosing class.
	(check_field_decls): Do not call duplicate_fields.
	* decl.c (grokdeclarator): Remove check for static data members
	with the same name as their enclosing class.
	* name-lookup.c (push_class_level_binding): Check for members with
	the same name as their enclosing class.
	
	PR c++/13971
	* g++.dg/expr/cond4.C: New test.
	
	PR c++/14086
	* g++.dg/lookup/crash2.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.53&r2=1.3892.2.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.7&r2=1.452.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.595.4.4&r2=1.595.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.8&r2=1.1174.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.2.2&r2=1.34.2.3
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.79&r2=1.3389.2.80
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/cond4.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/lookup/crash2.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=14086


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

* [Bug c++/14086] [3.3/3.4/3.5 Regression] internal compiler error: Segmentation fault (enum name equals classname)
  2004-02-09 16:11 [Bug c++/14086] New: internal compiler error: Segmentation fault (enum name equals classname) hans dot buchmann at fhso dot ch
                   ` (2 preceding siblings ...)
  2004-02-16  3:09 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-16  3:15 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-16  3:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-02-16 03:15 -------
Fixed in GCC 3.4 and GCC 3.5.

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


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


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

end of thread, other threads:[~2004-02-16  3:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-09 16:11 [Bug c++/14086] New: internal compiler error: Segmentation fault (enum name equals classname) hans dot buchmann at fhso dot ch
2004-02-09 16:20 ` [Bug c++/14086] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-16  2:35 ` cvs-commit at gcc dot gnu dot org
2004-02-16  3:09 ` cvs-commit at gcc dot gnu dot org
2004-02-16  3:15 ` 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).