public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9708: Core dump from compiler
@ 2003-02-14 16:46 jkanze
  0 siblings, 0 replies; 2+ messages in thread
From: jkanze @ 2003-02-14 16:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9708
>Category:       c++
>Synopsis:       Core dump from compiler
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 14 16:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     James Kanze
>Release:        gcc-3.2.2
>Organization:
>Environment:
Solaris 2.8 on Sparc Ultra 5-10
054@~/tmp/gcc3 (24): uname -a
SunOS padev054 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
>Description:
Compiler core dumps on attached code.  I originally
encountered the problem with 3.1; after upgrading to
3.2.2, it is still present.

Compiler output:

054@~/tmp/gcc3 (27): g++3 -v -c bug.cc
Reading specs from /home/team02/jakan/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/specs
Configured with: ../gcc-3.2.2/configure --prefix=/home/team02/jakan/gnu --program-suffix=3 --enable-threads=posix
Thread model: posix
gcc version 3.2.2
 /home/team02/jakan/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=2 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc bug.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase bug.cc -version -o /var/tmp//ccWEtpTr.s
GNU CPP version 3.2.2 (cpplib) (sparc ELF)
GNU C++ version 3.2.2 (sparc-sun-solaris2.8)
	compiled by GNU C version 3.2.2.
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/home/team02/jakan/gnu/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/team02/jakan/gnu/include/c++/3.2.2
 /home/team02/jakan/gnu/include/c++/3.2.2/sparc-sun-solaris2.8
 /home/team02/jakan/gnu/include/c++/3.2.2/backward
 /home/team02/jakan/gnu/include
 /home/team02/jakan/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.2/include
 /usr/include
End of search list.
bug.cc: In function `int f()':
bug.cc:78: 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.
>How-To-Repeat:
Just recompile.
>Fix:

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

CiNpbmNsdWRlIDxsb2NhbGU+CiNpbmNsdWRlIDxtZW1vcnk+Cgp0ZW1wbGF0ZTwgdHlwZW5hbWUg
VCwgc2l6ZV90IE4gPgpUKgpiZWdpbiggVCAoJmEpWyBOIF0gKQp7CiAgICByZXR1cm4gYSA7Cn0K
CnRlbXBsYXRlPCB0eXBlbmFtZSBULCBzaXplX3QgTiA+ClQqCmVuZCggVCAoJmEpWyBOIF0gKQp7
CiAgICByZXR1cm4gYSArIE4gOwp9Cgp0ZW1wbGF0ZTwgdHlwZW5hbWUgVCwgc2l6ZV90IE4gPgpz
aXplX3QKc2l6ZSggV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ICAgZFsgc2l6ZSggcyApIF0gOwogICAgQ2hhcmFjdGVyKiAg
ICAgICAgICBkTmV4dCA7CiAgICBNQlN0YXRlICAgICAgICAgICAgIG1ic3RhdGUgOwogICAgQ29k
ZUN2dDo6cmVzdWx0ICAgICByCiAgICAgICAgPSBjdnQuaW4oIG1ic3RhdGUsCiAgICAgICAgICAg
ICAgICAgIGJlZ2luKCBzICksIGVuZCggcyApLCBzTmV4dCwKICAgICAgICAgICAgICAgICAgYmVn
aW4oIGQgKSwgZW5kKCBkICksIGROZXh0ICkgOwogICAgcmV0dXJuIHIgOwp9Cg==


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

* Re: c++/9708: Core dump from compiler
@ 2003-02-14 22:01 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-02-14 22:01 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jkanze, nobody

Synopsis: Core dump from compiler

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Feb 14 22:01:55 2003
State-Changed-Why:
    Reduced, this code looks like this:
    ---------------------------
    template <unsigned int N>
    char* begin(char (&a) [N] );
    
    template <unsigned int N>
    unsigned int size(char (&) [N] );
    
    void foo(char *);
    
    void bar()
    {
      char s[] = { 'a', 'b', 'c' } ;
      char d[ size( s ) ] ;
      foo(begin(d)) ;
    }
    ----------------------------
    This ICEs all compilers since at least 2.95. 3.4 presently
    gives this message:
    tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
    y.cc: In function `char* begin(char (&)[N])':
    y.cc:2: error: variable-size type declared outside of any function
    y.cc: In function `void bar()':
    y.cc:13: internal compiler error: Segmentation fault

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9708


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

end of thread, other threads:[~2003-02-14 22:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-14 16:46 c++/9708: Core dump from compiler jkanze
2003-02-14 22:01 bangerth

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).