public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* middle-end/4907: ICE on premature use of reference
@ 2001-11-14 10:27 Gert-jan Los
0 siblings, 0 replies; only message in thread
From: Gert-jan Los @ 2001-11-14 10:27 UTC (permalink / raw)
To: gcc-gnats
>Number: 4907
>Category: middle-end
>Synopsis: ICE if a reference is used during its own definition
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Mon Nov 19 13:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Gert-jan Los
>Release: 3.1 20011113 (experimental)
>Organization:
Universitaet Mannheim
>Environment:
System: Linux snoopy 2.2.19 #1 Thu May 31 15:16:55 CEST 2001 sparc unknown
Architecture: sparc
host: sparc-unknown-linux-gnu
build: sparc-unknown-linux-gnu
target: sparc-unknown-linux-gnu
configured with: /users/los/admin/software/gcc/snapshot/configure --prefix=/opt/devel --with-as=/opt/devel/bin/as --with-ld=/opt/devel/bin/ld --disable-threads --disable-nls --enable-languages=c,c++ --enable-long-long
>Description:
Compiling the presumably invalid code below gives an ICE on mainline
and 2.95.x.
gcc version 3.1 20011113 (experimental)
: In function `int main()':
:4: Internal compiler error in make_decl_rtl, at varasm.c:834
gcc version 2.95.4 20011006 (Debian prerelease)
: In function `int main()':
:4: Internal compiler error:
:4: Internal compiler error in `expand_expr', at expr.c:5852
gcc version 3.0.2 (Debian)
Compiles OK. The value of c is 0 (zero). Changing the code to return
'x' instead '&x' results in a segmentation fault at runtime.
>How-To-Repeat:
int foo(int const& x) { return int(&x); }
int main() {
int const& c = foo(c);
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-11-19 21:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-14 10:27 middle-end/4907: ICE on premature use of reference Gert-jan Los
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).