This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug Report: Illegal Instruction


I am receiving an "illegal instruction" error during run time.  The
error occurs in a switch statement that involves formatted output to
cout.  The error is eliminated by wrapping the suspect instructions
into a function and making a fuction call within the switch
case.  It seems to me that the instructions are well enough defined
that they should work in the switch case.  Spent a lot of time looking
for an error in my code.

The attached is a tar'd and gzip'd file containing a main directory
("test") and two sub-directories ("works" and "notwork").  The code in
the "notwork" directory produces the error.  The code in the
"works" is identical except for a simple fix to one file which
resolves the problem.  Running both programs will show the timing of
the error in the output (i.e., can see the interrupted table and the
full table).

I checked the list of well known bugs at http://gcc.gnu.org/ and did
not recognize anything related.

Here's what I am using.

gcc version:	2.8.1 (recognize that the latest version is at least
		2.9.5).
Compile flags:	-g -Wall -Werror -c
System:  	AIX

See the "readme" file in the "test" directory for additional
information.  The readme file also repeats some of the above
info.

Send any questions.

Bill Lawry
billl@unm.edu

works/notwork


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]