Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 401
    • Issues 401
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2061
Closed
Open
Created Mar 16, 2009 by Daniel Rolls@dsrGuest

Incorrect result from assignment from a with loop

Bugzilla Link 478
Created on Mar 16, 2009 19:45
Resolution FIXED
Resolved on Mar 18, 2009 20:29
Version 1.00beta
OS All
Architecture PC
Attachments bug478.sac

Extended Description

Created an attachment (id=506)
Code to reproduce the bug. Run "sac2c -DB bughunt2.sac && ./a.out ; echo $?" and watch the result
sac2c version 16013
Compile the code with -DB to see the with loop produce the wrong result and the program return 0. Compiler with -DA to see an equivalent for loop producing the correct result and the program return 1. Strangely -noINL and -noprelude both cause the bug to go away. I have removed all explicit inlining in the code and module imports now. 
By changing the defines at the top it should be clear that this bug does not depend on the size of the array above a certain size.
Copy the body of the function call into the main function to get a compiler crash.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking