public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/8332: strlen/template interaction causes ICE
@ 2002-10-23 22:06 Andrew Pinski
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2002-10-23 22:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/8332; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: martin.dorey@bluearc.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/8332: strlen/template interaction causes ICE
Date: Wed, 23 Oct 2002 22:05:18 -0700
This works fine for me on gcc 3.3 i686-pc-linux-gnu.
It also works on gcc 3.1.1, so it looks like a Debian specific bug,
report it to them.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/8332: strlen/template interaction causes ICE
@ 2002-11-07 15:26 Wolfgang Bangerth
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Bangerth @ 2002-11-07 15:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/8332; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c++/8332: strlen/template interaction causes ICE
Date: Thu, 7 Nov 2002 17:20:51 -0600 (CST)
This one may be related to PR 8493.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/8332: strlen/template interaction causes ICE
@ 2002-10-28 13:27 bangerth
0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2002-10-28 13:27 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, martin.dorey, nobody
Synopsis: strlen/template interaction causes ICE
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Oct 28 13:27:44 2002
State-Changed-Why:
I _can_ reproduce this. The bug goes away, if strlen is
renamed, or if its return type is changed to "int", so I
assume this has something to do with built-ins. However,
since the code also SegFaults if we include <string.h>, I
have no reason to believe that this code is wrong. I'd think
this is a serious regression from previous releases!
For more information: the SegFault occurs here:
#0 write_builtin_type (type=0x0) at ../../gcc-3.2/gcc/cp/mangle.c:1569
#1 0x080bbfc5 in write_type (type=0x401888c0)
at ../../gcc-3.2/gcc/cp/mangle.c:1399
#2 0x080bc8df in write_template_args (args=0x4019ec80)
at ../../gcc-3.2/gcc/cp/mangle.c:1789
#3 0x080bb13f in write_name (decl=0x401aac40, ignore_local_scope=0)
at ../../gcc-3.2/gcc/cp/mangle.c:719
#4 0x080bafd3 in write_encoding (decl=0x401aac40)
at ../../gcc-3.2/gcc/cp/mangle.c:654
#5 0x080bd586 in mangle_decl_string (decl=0x401aac40)
at ../../gcc-3.2/gcc/cp/mangle.c:630
The code in question is
/* TYPE may still be wchar_t, since that isn't in
integer_type_nodes. */
if (type == wchar_type_node)
write_char ('w');
else if (TYPE_FOR_JAVA (type)) <<<<< here
write_java_integer_type_codes (type);
else
and the reason is that type==0. On one frame higher, this
code is called from
write_builtin_type (TYPE_MAIN_VARIANT (type));
Here, type is still!=0, but given the nesting of macros,
this is the point where I leave the rest to someone else.
Regards
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8332
^ permalink raw reply [flat|nested] 4+ messages in thread
* c++/8332: strlen/template interaction causes ICE
@ 2002-10-23 21:46 martin.dorey
0 siblings, 0 replies; 4+ messages in thread
From: martin.dorey @ 2002-10-23 21:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 8332
>Category: c++
>Synopsis: strlen/template interaction causes ICE
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Oct 23 21:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: martin.dorey@bluearc.com
>Release: gcc-3.2.1 20021020 (Debian prerelease)
>Organization:
>Environment:
Linux trevithick 2.4.16 #2 Mon Dec 10 15:54:50 GMT 2001 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux
>Description:
Bang uptodate Debian testing/unstable g++-3.2 ICEs on this code. Interestingly, it's already started generating the .s file.
# 1 "playpen.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "playpen.cpp"
template <typename A1>
void monk2 (A1) {}
unsigned int strlen (const char*);
void monk ()
{
monk2 (strlen (""));
}
+ g++-3.2 -v -g -W -Wall -pedantic -c playpen.cpp -o playpen.o --save-temps
Reading specs from /usr/lib/gcc-lib/i386-linux/3.2.1/specs
Configured with: /mnt/data/gcc-3.1/gcc-3.2-3.2.1ds3/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.1 20021020 (Debian prerelease)
/usr/lib/gcc-lib/i386-linux/3.2.1/cpp0 -lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ playpen.cpp -W -Wall -pedantic playpen.ii
GNU CPP version 3.2.1 20021020 (Debian prerelease) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/3.2
/usr/include/c++/3.2/i386-linux
/usr/include/c++/3.2/backward
/usr/local/include
/usr/lib/gcc-lib/i386-linux/3.2.1/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-linux/3.2.1/cc1plus -fpreprocessed playpen.ii -quiet -dumpbase playpen.cpp -g -W -Wall -pedantic -version -o playpen.s
GNU CPP version 3.2.1 20021020 (Debian prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.1 20021020 (Debian prerelease) (i386-linux)
compiled by GNU C version 3.2.1 20021020 (Debian prerelease).
playpen.cpp: In function `void monk()':
playpen.cpp:10: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
.file "playpen.cpp"
.file 1 "playpen.cpp"
.section .debug_abbrev,"",@progbits
.Ldebug_abbrev0:
.section .debug_info,"",@progbits
.Ldebug_info0:
.section .debug_line,"",@progbits
.Ldebug_line0:
.text
.Ltext0:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-07 23:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-23 22:06 c++/8332: strlen/template interaction causes ICE Andrew Pinski
-- strict thread matches above, loose matches on Subject: below --
2002-11-07 15:26 Wolfgang Bangerth
2002-10-28 13:27 bangerth
2002-10-23 21:46 martin.dorey
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).