public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/5547: g++ 3.1 crash in output_operand
@ 2002-01-30 16:26 snyder
  0 siblings, 0 replies; 2+ messages in thread
From: snyder @ 2002-01-30 16:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5547
>Category:       optimization
>Synopsis:       g++ 3.1 crash in output_operand
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 30 16:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     scott snyder
>Release:        3.1 20020129 (experimental)
>Organization:
>Environment:
System: Linux karma 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long
>Description:

When the source below is compiled with optimization, debugging, 
and PIC code generation all turned on, the compiler stops with
an internal error:

$ g++ -c -g  -O2  -fpic   x.cc
x.cc:29: output_operand: invalid expression as operand
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:

Compile this source with `-c -g -O2 -fpic'.

---------------------------------------------------------------------------
struct string {
  char* s;
};


inline string operator+(char a, const string & b) {
  string s;
  s.s = new char[12];
  s.s[0] = a;
  return s;
}


struct hash_map {
  int find(const string & key) const;
};



static const char sss[7] = "012345";


static void function(const string & name, 
                     const hash_map & dictionary, int npar) 
{
  int iter = dictionary.find (sss[npar]+name);
  for(int i=0; i<npar; i++) ;
}
---------------------------------------------------------------------------



>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: optimization/5547: g++ 3.1 crash in output_operand
@ 2002-02-13 14:24 jakub
  0 siblings, 0 replies; 2+ messages in thread
From: jakub @ 2002-02-13 14:24 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jakub, nobody, snyder

Synopsis: g++ 3.1 crash in output_operand

Responsible-Changed-From-To: unassigned->jakub
Responsible-Changed-By: jakub
Responsible-Changed-When: Wed Feb 13 14:24:47 2002
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->closed
State-Changed-By: jakub
State-Changed-When: Wed Feb 13 14:24:47 2002
State-Changed-Why:
    Fixed by http://gcc.gnu.org/ml/gcc-patches/2002-02/msg00820.html

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


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

end of thread, other threads:[~2002-02-13 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-30 16:26 optimization/5547: g++ 3.1 crash in output_operand snyder
2002-02-13 14:24 jakub

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