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
  • #1868
Closed
Open
Created Mar 06, 2012 by Bep Rinto@broGuest

sac2c fails to compile classtype referenced more than once

Bugzilla Link 929
Created on Mar 06, 2012 19:23
Resolution WORKSFORME
Resolved on Mar 07, 2012 04:21
Version 1.00beta
OS Linux
Architecture PC

Extended Description

I have this great idea how to write SAC image format parsing code.
Really great! However, my road to progress and fame is continuously
hindered by the bugs in sac2c... Here's another one. I simplified
the code as much as a I could to help you fix it as fast as you can,
because I need it! :-)
sac2c complains thus:
sac2c -v0 -g -O3 -linksetsize 0  -mt X.sac -o lib
ERROR: line 13  file: X.sac
ERROR: Unique var x of type X referenced more than once
ERROR: line 11  file: X.sac
ERROR: Previous reference was here
*** Compilation failed ***
*** Exit code 66 (Checking uniqueness property of objects)
*** 2 Error(s), 0 Warning(s)
About the code from the file X.sac which you can find below.
I varied with pragma's like refcounting, etc. All without help.
Here comes the code:
class X;
external classtype;
export all;
void readX()
{
  x = openX();
  readHeader( x);
  readData( x);
}
external X openX();
    #pragma effect    FileSystem::TheFileSystem
    #pragma linkobj  "x.o"
    #pragma linkname "SAC_X_open"
external void readHeader( X x);
    #pragma effect    FileSystem::TheFileSystem
    #pragma linkobj  "x.o"
    #pragma linkname "SAC_X_read_header"
  
external void readData( X x);
    #pragma effect    FileSystem::TheFileSystem
    #pragma linkobj  "x.o"
    #pragma linkname "SAC_X_read_data"
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking