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]
Other format: [Raw text]

invalid expression evaluation in gcc



Submitter-Id:	net
Originator:	Griff Smith
Organization:	AT&T Labs
Confidential:	no
Synopsis:	invalid expression evaluation in gcc
Severity:	serious
Priority:	medium
Category:	c
Class:		wrong-code
Release:	3.0.2
Environment:	nothing relevant
System: SunOS hera 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-Enterprise
Architecture: sun4
host: sparc-sun-solaris2.6
build: sparc-sun-solaris2.6
target: sparc-sun-solaris2.6
configured with: /usr/local/src/add-on/gcc-3.0.2/configure 
--prefix=/usr/add-on/gcc-3.0.2
Description:	The values of the two occurrences of (tmpvar->num = tmpnum)
		are not computed correctly; I think the compiler loses track
		of which registers contain each value.  I also see the same
		error in the IBM S390 version of the compiler.  The test
		program should exit with status = 0 if the compilation is
		valid, status = 1 if invalid.  The Sun WorkShop Compiler 5.0
		compiles this code correctly.
How-To-Repeat:	gcc -o gccerr gccerr.c; ./gccerr; echo $?
Fix:		Simplify expression

Attachment: gccerr.c
Description: gccerr.c


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