Bug 43071

Summary: g++ 2.96: In instantiation of `array<1, 8, integer>' : Internal error: Segmentation fault.
Product: [Retired] Red Hat Linux Reporter: Robert K. Moniot <moniot>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-01 12:26:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Sample c++ code that causes compiler to seg fault none

Description Robert K. Moniot 2001-05-31 13:56:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19-6.2.1 i586)

Description of problem:
When compiling a C++ program produced from a Pascal original by ptoc v3.52,
instantiation of an array gives Internal error: Segmentation fault.

How reproducible:
Always

Steps to Reproduce:
1. Download http://www.ispras.ru/~knizhnik/ptoc-3.52.tar.gz, untar.
2. Copy bug.cxx source (attached) into ptoc directory.
3. g++ -O5 -g -Wall -c  -I. -o bug.o -c bug.cxx
	

Actual Results:  array.h: In instantiation of `array<1, 8, integer>':
bug.cxx:23:   instantiated from here
array.h:184: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


Expected Results:  Normal compilation, no error messages.

Additional info:

The attached sample program bug.cxx is as small as I can get it to
show the bug.  The ptoc source is only needed to supply the two include
files io.h and array.h.

Comment 1 Robert K. Moniot 2001-05-31 13:58:18 UTC
Created attachment 20030 [details]
Sample c++ code that causes compiler to seg fault

Comment 2 Jakub Jelinek 2001-06-01 12:26:13 UTC
Name mangling bug where it did not handle properly the subtraction in
format_string<high_bound-low_bound+1>((char*)a.buf, width);
Will be fixed in gcc-c++-2.96-86.