see test program stressCo.icn in bug [#242]
It does no string-invoke, but
without -fa, it fails to compile:
$UNICON -C stressCo
Parsing stressCo.icn: .......
Parsing /aufs/uni5197mtnoc/bin/../ipl/procs/posix.icn: .........
/home/kubuntu/unicon/bin/iconc -U1 -o stressCo -A /tmp/kubuntu/uni12494008 /tmp/kubuntu/uni12038686-iconc /tmp/kubuntu/uni21083446-iconc
Translating to C:
No errors; no warnings
Compiling and linking C code:
stressCo.c: In function ‘P00m_main’:
stressCo.c:1367:4: warning: implicit declaration of function ‘P003_A’ [-Wimplicit-function-declaration]
P003_A(&(*r_pfp).t.d[9]);
^~~~~~
stressCo.c: In function ‘P00o_main’:
stressCo.c:1410:4: warning: implicit declaration of function ‘P005_C’ [-Wimplicit-function-declaration]
P005_C();
^~~~~~
/tmp/kubuntu/ccupnuxx.o: In function P00o_main':
stressCo.c:(.text+0x747): undefined reference to
P005_C'
/tmp/kubuntu/ccupnuxx.o: In function P00m_main':
stressCo.c:(.text+0x19cd): undefined reference to
P003_A'
collect2: error: ld returned 1 exit status
C compile and link failed
This reproduces for me. It is likely that the compiler determines that a, b, and c are never activated, so A(), B(), and C() are never called, so it is omitting the code for them, but obviously it is not omitting the create code, which contains links to them, so this is a bug. Thanks for the -fs workaround observation.
trivia:
in tests/coexpr:
unicon -C cobench
./cobench
# ^ works.
Works now after [r5274], thanks for the fix. Ok to close this.
Related
Commit: [r5274]
Or maybe: new title:
unicon -C -nofs stressCo # fails
Also, for completeness, naturally
iconc stressCo
# ^ fails
iconc -fa stressCo
# ^ works
snapshot 9/6:
iconc stressCo
now works.
Ok to close this.