mnbujold / c415-compiler

Fall 2012 CMPUT 415 Compiler Course
0 stars 3 forks source link

Seg fault #41

Closed James-Osgood closed 11 years ago

James-Osgood commented 11 years ago

We get a segmentation fault in g04.pal. Not good. Maybe we should have an "exit gracefully" wrapper ...

Also get a seg fault in: g07.pal

dchui1 commented 11 years ago

THe bug isn't fixed, but we exit gracefully now?

dchui1 commented 11 years ago

The bug is when you try to assign a new value to a constant;

James-Osgood commented 11 years ago

Now, just broken in g07 as above.

dchui1 commented 11 years ago
function scopeTest () : integer;
    const scopeTest = 1; // this is redefining an identifier
    begin
        scopeTest := 5; // possibly also complain here if scopetest is seen as a const (can't store into a const)

scopeTest is not attempting to assign a value to a constant; it is trying to do an assignment to the function return value. However, this segfaults and I'm not sure why...

dchui1 commented 11 years ago

This is probably related to my uissue of generating code; we actually aren't doing anything here!

James-Osgood commented 11 years ago

We are no longer getting a seg fault here! Good job everyone!