<< Back to previous view

[PCC-360] runtime crash on float assignment Created: 23/Jun/11  Updated: 25/Jun/11

Status: Closed
Project: pcc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nicolas Joly Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: NetBSD lynche.sis.pasteur.fr 5.99.52 NetBSD 5.99.52 (LYNCHE) #7: Wed May 25 18:14:00 CEST 2011 njoly@lynche.sis.pasteur.fr:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LYNCHE amd64
pcc 1.1.0.DEVEL 20110620 for x86_64-unknown-netbsd5.99.52


 Description   
The following sample code, crash at runtime on f2 assignment:

njoly@lynche [~]> cat xx.c
int main() {
  float f1 = 0.0;
  float f2 = -f1;
  return 0; }
njoly@lynche [~]> pcc -g -o xx xx.c; echo $?
0
njoly@lynche [~]> ./xx
zsh: segmentation fault (core dumped) ./xx
njoly@lynche [~]> gdb xx xx.core
GNU gdb 6.5
[...]
Core was generated by `xx'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000040089e in main () at xx.c:3
3 float f2 = -f1;


 Comments   
Comment by Anders Magnusson [ 25/Jun/11 10:04 AM ]
Can you please recheck? It may just have been fixed.
Comment by Nicolas Joly [ 25/Jun/11 11:11 AM ]
Indeed. No more problem.
Thanks.
Comment by Anders Magnusson [ 25/Jun/11 11:14 AM ]
Fixed.
Generated at Fri Nov 28 00:06:06 CET 2014 using JIRA Enterprise Edition, Version: 3.13.1-#333.