This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/467: Creating a table with a pointer to member causes ice



>Number:         467
>Category:       c++
>Synopsis:       Creating a table with a pointer to member causes ice
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 12 06:06:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     bds02@uow.edu.au
>Release:        gcc version 2.95.2 19991024
>Organization:
>Environment:
Linux 2.2.16
>Description:
I'm not sure that this is the simplest code 
fragment to cause this, but it's much simpler 
than what I started with.

I have a table (array of structs) which includes a pointer
to member as one of the fields. If I remove the pointer 
to member field, the ice goes away.

The last line of the table is supposed to be a sentinel.
It includes a dummy enumeration member - 0, and all the
other fields are not initalised. (initialising them also
seems to cause an ice - no diff...) Commenting out this 
last line seems to remove the ice.

Here's the output I get from the suggested command line:

ben [22:51:13] ~/testing/gcc_bug $ g++ -v -save-temps bug2.cc
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ bug2.cc bug2.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3
 /usr/local/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../i586-pc-linux-gnu/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/cc1plus bug2.ii -quiet -dumpbase bug2.cc -version -o bug2.s
GNU C++ version 2.95.2 19991024 (release) (i586-pc-linux-gnu) compiled by GNU C version 2.95.2 19991024 (release).
bug2.cc: In method `void MacroStage::InitKeywordCallbacks()':
bug2.cc:27: Internal compiler error in `const_hash', at varasm.c:2372
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
ben [22:51:28] ~/testing/gcc_bug $ 
>How-To-Repeat:
g++ bug2.ii
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug2.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug2.ii"

IyAxICJidWcyLmNjIgoKCmNsYXNzIE1hY3JvU3RhZ2UKewpwdWJsaWM6CiAgICB2b2lkIEluaXRL
ZXl3b3JkQ2FsbGJhY2tzKCk7CnByaXZhdGU6CiAgICB0eXBlZGVmIHZvaWQgKE1hY3JvU3RhZ2U6
OiogS0Z1bmNwKSh2b2lkKTsKCiAgICBlbnVtIFR5cGUgeyAKCWVJbmNsdWRlCiAgICB9OwoKICAg
IHZvaWQgRG9JbmNsdWRlKHZvaWQpOwp9OwoKdm9pZApNYWNyb1N0YWdlOjpJbml0S2V5d29yZENh
bGxiYWNrcygpCnsKICAgIHN0cnVjdCBLZXl3b3JkUmVjb3JkIHsKCVR5cGUJbVR5cGU7CglLRnVu
Y3AJbUZ1bmM7CiAgICB9OwogICAgS2V5d29yZFJlY29yZCBrcmFbXSA9IHsKCXsgZUluY2x1ZGUs
CSZNYWNyb1N0YWdlOjpEb0luY2x1ZGUgfSwKCXsgVHlwZSgwKSB9CiAgICB9Owp9CgoKCgo=

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]