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 21298 - gcc crashes on undef symbol as initialized array size
gcc crashes on undef symbol as initialized array size
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-11-24 08:33 EST by David Nečas
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-11-24 08:33:46 EST
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 David Nečas 2000-11-24 08:33:43 EST
gcc crashes when compiling following source


where SOME_UNDEFINED_SYMBOL is some undefined symbol.
(It does not depend on what follows the `=' so nothing is as good as
anything else, gcc never gets there.)

Using an undefined symbol as array size is clearly an error, but it
shouldn't crash the compiler.

gcc version: 2.96-54 from RedHat Linux 7.0, not modified
gcc -v:
  Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
  gcc version 2.96 20000731 (Red Hat Linux 7.0)

Command used to compile (assume the source is called g.c):
  gcc -c g.c

  g.c:1: `SOME_UNDEFINED_SYMBOL' undeclared here (not in a function)
  g.c:1: Internal error: Segmentation fault.
  Please submit a full bug report.
  See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Nevertheless they state I should report gcc-2.96 bugs to OS vendor.
Comment 1 Jakub Jelinek 2000-11-25 03:20:46 EST
Fixed since I think gcc-2.96-61, definitely in current gcc-2.96-64.

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