Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 50244 - gcc-2.96-85 segfault: g++ -g -O
gcc-2.96-85 segfault: g++ -g -O
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
: 50795 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2001-07-28 20:36 EDT by Daniel Karlsson
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-03 14:17:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Karlsson 2001-07-28 20:36:12 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.6 i686)

Description of problem:
The following program makes g++ segfault when using options -g and -O.
Workaround: name the union, don't use -g or -O

How reproducible:

Steps to Reproduce:
1.Save source to bug.cc
2.g++ -g -O -c bug.cc


Actual Results:  g++ internal error: segfault in A &A::func2(double &)

Expected Results:  g++ not segfaulting ;)

Additional info:

struct A {
  int func1();
  A &func2(double &);
  return 0;
A &
A::func2(double &arg)
  union {
    double x;
    char y[8];
  y[0] = func1();
  arg = x;
  return *this;
Comment 1 Jakub Jelinek 2001-08-03 14:17:21 EDT
I've fixed this in http://gcc.gnu.org/ml/gcc-patches/2001-08/msg00154.html.
Will be fixed in gcc-2.96-96.
Comment 2 Jakub Jelinek 2001-08-20 08:46:18 EDT
*** Bug 50795 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.