sac2c issueshttps://gitlab.sac-home.org/sac-group/sac2c/-/issues2021-09-06T19:43:52Zhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/12872D array assignment in for loops2021-09-06T19:43:52ZRobert Stewart2D array assignment in for loops| | |
| --- | --- |
| Bugzilla Link | [1141](http://bugs.sac-home.org/show_bug.cgi?id=1141) |
| Created on | Oct 29, 2014 15:25 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>This code compiles ...| | |
| --- | --- |
| Bugzilla Link | [1141](http://bugs.sac-home.org/show_bug.cgi?id=1141) |
| Created on | Oct 29, 2014 15:25 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>This code compiles just fine:
int main()
{
xs = [1,2,3];
for( i=0; i<3; i++) {
xs[i] = 5;
}
return 1; }
The following very similar code does not compile. The only difference is that it is assigning to a 2D array, rather than a 1D array as before.
int main()
{ xss = [[1,2,3],[4,5,6]];
for( i=0; i<2; i++) {
for( j=0; j<2; j++) {
xss[i][j] = 5;
}
}
return 1; }
The compile error is:
$ sac2c test.sac
./test.sac 5:35 error:
=> token `;' expected, `=' token found
abort: Failed to construct a syntax tree for `test.sac'
compilation failed while Loading SAC program, 1 error(s).
Line 5 is `xss[i][j] = 5;`.</pre>Artem ShinkarovArtem Shinkarovhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2131Scan/parse does not believe in some forms of scientific notation2017-11-19T22:00:59ZRobert BerneckyScan/parse does not believe in some forms of scientific notation| | |
| --- | --- |
| Bugzilla Link | [1140](http://bugs.sac-home.org/show_bug.cgi?id=1140) |
| Created on | Oct 14, 2014 21:33 |
| Resolution | FIXED |
| Resolved on | Nov 05, 2015 19:53 |
| Version | svn |
| OS | Linux |
| Architectu...| | |
| --- | --- |
| Bugzilla Link | [1140](http://bugs.sac-home.org/show_bug.cgi?id=1140) |
| Created on | Oct 14, 2014 21:33 |
| Resolution | FIXED |
| Resolved on | Nov 05, 2015 19:53 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>Specifically, this example fails on the line assigning to z:
cat scientificnotationbug.sac
int main()
{
x = 1.2e+3;
StdIO::print();
y = 1.2e-3;
StdIO::print(y);
z = 1.2e3; // This should work.
StdIO::print(z);
return(0);
}
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c scientificnotationbug.sac
./scientificnotationbug.sac 9:11 error:
=> + or - expected after exponent
./scientificnotationbug.sac 9:7 error:
=> token 1.2e cannot start an expression.
abort: Failed to construct a syntax tree for `scientificnotationbug.sac'
compilation failed while Loading SAC program, 2 error(s).
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
product rev 18509 linux-gnu_x86_64
(Tue Oct 14 15:48:09 EDT 2014 by sac)
This did work, once upon a time, I believe.</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1173sac2crc information confusing or missing2017-11-19T20:28:07ZRobert Berneckysac2crc information confusing or missing| | |
| --- | --- |
| Bugzilla Link | [1139](http://bugs.sac-home.org/show_bug.cgi?id=1139) |
| Created on | Sep 30, 2014 22:44 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I am trying to make...| | |
| --- | --- |
| Bugzilla Link | [1139](http://bugs.sac-home.org/show_bug.cgi?id=1139) |
| Created on | Sep 30, 2014 22:44 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I am trying to make sac2c use a gcc linker option, but am not
having much luck. Here's what I tried:
sac2c time2code.sac -v1
/usr/local/lib/sac2c/18614/rt/host/seq/libsac.so: undefined reference to `SAC_HM_ShowDiagnostics'
collect2: error: ld returned 1 exit status
abort: System failed to execute shell command
abort: gcc -std=gnu99 /tmp/SAC_0XIPol/a.out.o
abort: -L/usr/local/lib/sac2c/18614/modlibs/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/18614/modlibs/host/seq
abort: -L/usr/local/lib/sac2c/18614/modlibs/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/18614/modlibs/host/seq -L./host/seq
abort: -Wl,-rpath,./host/seq -L/usr/local/lib/sac2c/18614/rt/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/18614/rt/host/seq -lArrayMod
abort: -lArrayTransformMod -lConstantsMod -lArrayArithMod -lArrayBasicsMod -lBoolMod
abort: -lScalarArithMod -lsacpreludeMod -L/usr/local/dislin
abort: -Wl,-rpath,/usr/local/dislin -L/opt/local/lib -Wl,-rpath,/opt/local/lib
abort: -lsacphmc -lsac -lsacphmc -o a.out
abort: with exit code 1
compilation failed while Creating binary code.
This looks like the changed gcc linker behavior, where it no longer
does the "as-needed" inclusion of .so files.
I tried to fix this by creating /home/sac/.sac2crc, as follows:
target add_seq:
CFLAGS += " --Wl,--no-as-needed "
Compiling with this file produces the above result. I.e.,
it looks like the flags are NOT being used in the command line.
I know that the file IS being read, because if I spell the first
line as "xtarget" rather than "target", then the sac2c parser complains.
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18614</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1172Ubuntu can't see libArray.so using sac2c-follow2017-11-19T20:28:04ZRobert BerneckyUbuntu can't see libArray.so using sac2c-follow| | |
| --- | --- |
| Bugzilla Link | [1138](http://bugs.sac-home.org/show_bug.cgi?id=1138) |
| Created on | Sep 30, 2014 16:20 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I just recompiled s...| | |
| --- | --- |
| Bugzilla Link | [1138](http://bugs.sac-home.org/show_bug.cgi?id=1138) |
| Created on | Sep 30, 2014 16:20 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I just recompiled sac2c and the stdlib from scratch, under sac2c-follow
on Ubuntu 14.04 LTS.
At this point, I am unable to compile anything that uses the standard
library:
ls /usr/local/libexec/sac2c/18614
comslc ctest libsac2c.so sac2c-p saccc tree
csima libsac2c.d.so sac2c sac2tex sacpolylibisnullintersect
csimt libsac2c.p.so sac2c-d sac4c sacprapolyhedral
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c time2code.sac
MT_MODE = 0 in target, forcing -numthreads to 1.
** 1: Loading SAC program ...
**** Locating source code ...
Reading from file "./time2code.sac" ...
**** Running C preprocessor ...
**** Parsing input file ...
abort: Cannot find library `tree/host/libArrayTree.so' for module `Array'
compilation failed while Loading SAC program.
sac@rattler:~/sac/testsuite/optimizations/awlf$ ls /usr/local/libexec/sac2c/18614/tree/host/
libsacpreludeTree.so
I see that there is nothing under tree/host except the sacprelude, so
the abort makes sense.
I looked for some help on the sac-home web site, here:
http://www.sac-home.org/index.php?p=.%2F55_Download%2F41_Installation%2F41_Trouble_Shooting
cat $SAC2CBASE/sac2crc
# Circumvent ubuntu linker problem.
target seq:
CFLAGS += " --Wl,--no-as-needed "
There is an empty .sac2crc in /home/sac.
I am guessing something is wrong with the install of the generated
stdlib.
sudo make install
for the stdlib shows, in part, this:
Making install for target mt_pth
** Note: modules Dislin DislinBars DislinQuick DislinCanvas DislinPage DislinPlot3d DislinSystem disabled due to configuration.
make[3]: Entering directory `/home/sac/sac/BASE/stdlib'
/usr/bin/install -c -d /usr/local/libexec/sac2c/18604/tree/host
/usr/bin/install -c -d /usr/local/lib/sac2c/18604/modlibs/host/mt-pth
sac2c-p -V
sac2c v1.00-beta (Haggis And Apple)
product rev 18614
(Mon Sep 29 16:03:13 EDT 2014 by sac)
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c-d -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18614
Eventually, I did a .configure in the stdlib before building
and installing the stdlib. That resolved the above problem,
but things then die in the linker, as noted in an earlier bug report.
This strikes me as something that is going to break a lot
of attempts to work with sac2c. Perhaps the makefile
can be fancied up so that it detects when sac2c has been changed,
and force a rerun of configure, or else abort with a suitable
error message?</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1982MTSTFMOD can't deal with recursion2017-11-19T21:46:01ZSven-Bodo ScholzMTSTFMOD can't deal with recursion| | |
| --- | --- |
| Bugzilla Link | [1137](http://bugs.sac-home.org/show_bug.cgi?id=1137) |
| Created on | Sep 20, 2014 23:28 |
| Resolution | FIXED |
| Resolved on | Sep 20, 2014 23:48 |
| Version | svn |
| OS | All |
| Architecture...| | |
| --- | --- |
| Bugzilla Link | [1137](http://bugs.sac-home.org/show_bug.cgi?id=1137) |
| Created on | Sep 20, 2014 23:28 |
| Resolution | FIXED |
| Resolved on | Sep 20, 2014 23:48 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1136.sac](/uploads/55342df86d1c8e258e43525d02455b2a/1136.sac) |
## Extended Description
<pre>Created an attachment (id=1029)
source code
the ST version of evil, in its spmd function calls the ST version again leading to a deadlock.
compile with -mt -minmtsize 10 -bmt | vi -
shows this</pre>Clemens GrelckClemens Grelckhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1981wrong sped function abstraction when using states and loops2017-11-19T21:45:55ZSven-Bodo Scholzwrong sped function abstraction when using states and loops| | |
| --- | --- |
| Bugzilla Link | [1136](http://bugs.sac-home.org/show_bug.cgi?id=1136) |
| Created on | Sep 19, 2014 15:35 |
| Resolution | FIXED |
| Resolved on | Mar 26, 2015 21:14 |
| Version | svn |
| OS | All |
| Architecture...| | |
| --- | --- |
| Bugzilla Link | [1136](http://bugs.sac-home.org/show_bug.cgi?id=1136) |
| Created on | Sep 19, 2014 15:35 |
| Resolution | FIXED |
| Resolved on | Mar 26, 2015 21:14 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [TotientRange.sac](/uploads/0a0d05cb0ed3b6e70cf13ae673b87e38/TotientRange.sac), [bound.sac](/uploads/d9c6ac57305d8ef2acf038c41c3db784/bound.sac), [1130swap.sac](/uploads/e5738db0a2c9bdb630762fba381a5a0c/1130swap.sac) |
## Extended Description
<pre>Created an attachment (id=1025)
source code
after mtstf ( sac2c-d -mt -o lib -Llib 1130.sac -noprelude -bmt:mtstf) we have:
_flat_0 = with2 (_pinl_420_iv=[_pinl_421__eat_14] (IDXS:_wlidx_581__flat_0)) {....}
where _pinl_1116__flat_59 is locally defined and used in the body...
after mtspmdf (sac2c-d -mt -o lib -Llib 1130.sac -noprelude -bmt:mtspmdf) we have:
cs, scs__SSA0_2 = maxclique:_ST::_mtspmdf_1354_expandFS( _pinl_1116__flat_59, c, scs, _flat_0) ;
this results in broken C code where the variable is used when setting up the SPMD frame without being defined.</pre>Clemens GrelckClemens Grelckhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1171opt WLLO broken when inlining fold operation2017-11-19T20:26:20ZSven-Bodo Scholzopt WLLO broken when inlining fold operation| | |
| --- | --- |
| Bugzilla Link | [1135](http://bugs.sac-home.org/show_bug.cgi?id=1135) |
| Created on | Sep 19, 2014 14:51 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [bound.sac](/uploads/50af64379077a9a...| | |
| --- | --- |
| Bugzilla Link | [1135](http://bugs.sac-home.org/show_bug.cgi?id=1135) |
| Created on | Sep 19, 2014 14:51 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [bound.sac](/uploads/50af64379077a9a07db9295907727bc0/bound.sac), [1130.sac](/uploads/e162a457b02efcd562100993aefad122/1130.sac) |
## Extended Description
<pre>Created an attachment (id=1023)
source code
sac2c-d -mt -doWLLO -minmtsize 40 -o lib -Llib 1130.sac -noprelude
leads to segfault in DCR caused by a broken assignment chain after bOPT:
scs__SSA0_1 = _prop_obj_in_( _flat_12, scs);
scs__SSA0_3 = _prop_obj_out_( scs__SSA0_2);
scs__SSA0_2, c__SSA0_2 = maxclique::expandFS__Cond_1( _pinl_666__flat_50, scs__SSA0_1, c__SSA0_1) ;</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1170AKD fold with state breaks in ICM implementation2017-11-19T20:30:33ZSven-Bodo ScholzAKD fold with state breaks in ICM implementation| | |
| --- | --- |
| Bugzilla Link | [1134](http://bugs.sac-home.org/show_bug.cgi?id=1134) |
| Created on | Sep 19, 2014 14:38 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1134.sac](/uploads/5ea60392abd00b92...| | |
| --- | --- |
| Bugzilla Link | [1134](http://bugs.sac-home.org/show_bug.cgi?id=1134) |
| Created on | Sep 19, 2014 14:38 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1134.sac](/uploads/5ea60392abd00b929450f62ec35c0f95/1134.sac), [bound.sac](/uploads/f5a6571d43597c115eb44638e98e99dc/bound.sac) |
## Extended Description
<pre>Created an attachment (id=1021)
source code
attached code fails if taking away the inline of the fold function:
sac2c-d -v1 -mt -doWLLO -minmtsize 40 -o lib -Llib 1134.sac -noprelude
warning: Module/class 'maxclique` should be in a file named "maxclique.sac" instead of "1134.sac"
fun1.c:2217:7: warning: incompatible pointer to integer conversion assigning to 'int' from 'bool *' (aka 'int *'); dereference with * [-Wint-conversion]
SAC_MT_SYNC_FOLD_out( SACf_maxclique_CL_ST___mtspmdf_272_expandFS__bl_300__bl_300__SACt_bound__bound, 1, (SACl_cs, (AKD, (NHD, (NUQ, (INT, (GLO, (NON, (NOT, )))))))), (SACp_mtspmdfanon_271_scs__SSA0_2, (SCL, (NHD, (NUQ, (INT, (GLO, (NON, (NOT, ))))))))...
^
/Volumes/Users/sbs/sac2c//include/sac.h:4167:72: note: expanded from macro 'SAC_MT_SYNC_FOLD_out'
#define SAC_MT_SYNC_FOLD_out( arg1, arg2, nt , gra1, gra2, gra3, gra4) CAT_M4_mt_gen_19(SAC_MT_SYNC_FOLD_out_, CAT_M4_mt_gen_20(NT_SHP(nt), NT_HID(nt)))( arg1, arg2, nt , gra1, gra2, gra3, gra4)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4186:32: note: expanded from macro 'CAT_M4_mt_gen_19'
#define CAT_M4_mt_gen_19(x, y) xCAT_M4_mt_gen_19(x, y)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4187:33: note: expanded from macro 'xCAT_M4_mt_gen_19'
#define xCAT_M4_mt_gen_19(x, y) x##y
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Volumes/Users/sbs/sac2c//include/sac.h:4174:42: note: expanded from macro 'SAC_MT_SYNC_FOLD_out_AKDNHD'
#define SAC_MT_SYNC_FOLD_out_AKDNHD(...) SAC_MT_SYNC_FOLD_out__DESC(__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Users/sbs/sac2c//include/sac.h:3922:93: note: expanded from macro 'SAC_MT_SYNC_FOLD_out__DESC'
#define SAC_MT_SYNC_FOLD_out__DESC( spmdfun, num, accu_NT, val_NT, basetype, tag, foldfun) SAC_MT_RECEIVE_RESULT_out__DESC( spmdfun, SAC_MT_son_id, num, val_NT); SAC_##tag##_FUNAP2( foldfun, SAC_ND_ARG_out( accu_NT, basetype), SAC_ND_ARG_in( accu_NT, baset...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Users/sbs/sac2c//include/sac.h:3913:99: note: expanded from macro 'SAC_MT_RECEIVE_RESULT_out__DESC'
#define SAC_MT_RECEIVE_RESULT_out__DESC( spmdfun, local_id, num, var_NT) SAC_ND_A_FIELD( var_NT) = rdata[local_id].in_##num; SAC_ND_A_DESC( var_NT) = rdata[local_id].in_##num##_desc;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
fun1.c:2217:7: error: use of undeclared identifier '_ICM_IS_UNDEFINED_'
/Volumes/Users/sbs/sac2c//include/sac.h:4167:72: note: expanded from macro 'SAC_MT_SYNC_FOLD_out'
#define SAC_MT_SYNC_FOLD_out( arg1, arg2, nt , gra1, gra2, gra3, gra4) CAT_M4_mt_gen_19(SAC_MT_SYNC_FOLD_out_, CAT_M4_mt_gen_20(NT_SHP(nt), NT_HID(nt)))( arg1, arg2, nt , gra1, gra2, gra3, gra4)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4186:32: note: expanded from macro 'CAT_M4_mt_gen_19'
#define CAT_M4_mt_gen_19(x, y) xCAT_M4_mt_gen_19(x, y)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4187:33: note: expanded from macro 'xCAT_M4_mt_gen_19'
#define xCAT_M4_mt_gen_19(x, y) x##y
^
note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Volumes/Users/sbs/sac2c//include/sac.h:1015:38: note: expanded from macro 'SAC_ND_A_DESC_SCLNHDNUQ'
#define SAC_ND_A_DESC_SCLNHDNUQ(...) SAC_ND_A_DESC__UNDEF(__VA_ARGS__)
^
/Volumes/Users/sbs/sac2c//include/sac.h:686:40: note: expanded from macro 'SAC_ND_A_DESC__UNDEF'
#define SAC_ND_A_DESC__UNDEF( var_NT) SAC_ICM_UNDEF()
^
/Volumes/Users/sbs/sac2c//include/sac.h:3066:26: note: expanded from macro 'SAC_ICM_UNDEF'
#define SAC_ICM_UNDEF() _ICM_IS_UNDEFINED_
^
fun1.c:2217:7: error: too few arguments to function call, expected 7, have 6
...SAC_MT_SYNC_FOLD_out( SACf_maxclique_CL_ST___mtspmdf_272_expandFS__bl_300__bl_300__SACt_bound__bound, 1, (SACl_cs, (AKD, (NHD, (NUQ, (INT, (GLO, (NON, (NOT, )))))))), (SACp_mtspmdfanon_271_scs__SSA0_2, (SCL, (NHD, (NUQ, (INT, (GLO, (NON, (NOT, )))))))), bool, MT, SACf_maxclique_CL_MT__maxsum__bl_X__bl_X);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Users/sbs/sac2c//include/sac.h:4167:72: note: expanded from macro 'SAC_MT_SYNC_FOLD_out'
#define SAC_MT_SYNC_FOLD_out( arg1, arg2, nt , gra1, gra2, gra3, gra4) CAT_M4_mt_gen_19(SAC_MT_SYNC_FOLD_out_, CAT_M4_mt_gen_20(NT_SHP(nt), NT_HID(nt)))( arg1, arg2, nt , gra1, gra2, gra3, gra4)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4186:32: note: expanded from macro 'CAT_M4_mt_gen_19'
#define CAT_M4_mt_gen_19(x, y) xCAT_M4_mt_gen_19(x, y)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4187:33: note: expanded from macro 'xCAT_M4_mt_gen_19'
#define xCAT_M4_mt_gen_19(x, y) x##y
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Volumes/Users/sbs/sac2c//include/sac.h:3922:165: note: expanded from macro 'SAC_MT_SYNC_FOLD_out__DESC'
#define SAC_MT_SYNC_FOLD_out__DESC( spmdfun, num, accu_NT, val_NT, basetype, tag, foldfun) SAC_MT_RECEIVE_RESULT_out__DESC( spmdfun, SAC_MT_son_id, num, val_NT); SAC_##tag##_FUNAP2( foldfun, SAC_ND_ARG_out( accu_NT, basetype), SAC_ND_ARG_in( accu_NT, baset...
^
<scratch space>:95:1: note: expanded from here
SAC_MT_FUNAP2
^
/Volumes/Users/sbs/sac2c//include/sac.h:3924:65: note: expanded from macro 'SAC_MT_FUNAP2'
#define SAC_MT_FUNAP2( name, ...) name( SAC_MT_self, __VA_ARGS__);
^
./header.h:318:1: note: 'SACf_maxclique_CL_MT__maxsum__bl_X__bl_X' declared here
SAC_C_EXTERN
^
./header.h:81:32: note: expanded from macro 'SAC_C_EXTERN'
#define SAC_C_EXTERN extern
^
1 warning and 2 errors generated.
abort: System failed to execute shell command
abort: cd /tmp/SAC_y2ljku; gcc -pedantic -Wall -Wno-unused -fno-builtin -march=native -mtune=native -I$SAC2CBASE/include/ -c fun1.c -o fun1_nonpic.o
abort: with exit code 1
compilation failed while Creating binary code, 1 warning(s).
-sbs-Bodos-IMac-></pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1169reference parameters and propagate break2017-11-19T20:26:12ZSven-Bodo Scholzreference parameters and propagate break| | |
| --- | --- |
| Bugzilla Link | [1133](http://bugs.sac-home.org/show_bug.cgi?id=1133) |
| Created on | Sep 19, 2014 12:47 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1130.sac](/uploads/6856ef4671ea2574...| | |
| --- | --- |
| Bugzilla Link | [1133](http://bugs.sac-home.org/show_bug.cgi?id=1133) |
| Created on | Sep 19, 2014 12:47 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1130.sac](/uploads/6856ef4671ea257425d0e27f09bc2ebd/1130.sac), [bound.sac](/uploads/4dea69576b06b40f32608d3e6cd15d6d/bound.sac) |
## Extended Description
<pre>Created an attachment (id=1019)
source code that fails; requires further class
The attached example breaks upon
sac2c -v1 -mt -doWLLO -minmtsize 40 -o lib -Llib 1130.sac
with
warning: Module/class 'maxclique` should be in a file named "maxclique.sac" instead of "1130.sac"
fun3.c:1293:7: error: use of undeclared identifier 'SACl_scs__p'
SAC_ND_PROP_OBJ_UNBOX( (SACl_scs, (SCL, (NHD, (NUQ, (INT, (GLO, (FPM, (NOT, )))))))), (SACl_scs, (SCL, (NH...
^
/Volumes/Users/sbs/sac2c//include/sac.h:3958:77: note: expanded from macro 'SAC_ND_PROP_OBJ_UNBOX'
#define SAC_ND_PROP_OBJ_UNBOX( unboxed, boxed) SAC_ND_A_FIELD( unboxed) = *SAC_NAMEP( SAC_ND_A_FIELD( boxed));
^
/Volumes/Users/sbs/sac2c//include/sac.h:785:27: note: expanded from macro 'SAC_NAMEP'
#define SAC_NAMEP( name) CAT0( name, __p)
^
/Volumes/Users/sbs/sac2c//include/sac.h:250:21: note: expanded from macro 'CAT0'
#define CAT0( x, y) xCAT0( x, y)
^
/Volumes/Users/sbs/sac2c//include/sac.h:251:22: note: expanded from macro 'xCAT0'
#define xCAT0( x, y) x##y
^
<scratch space>:18:1: note: expanded from here
SACl_scs__p
^
fun3.c:1298:7: error: use of undeclared identifier 'SACl_scs__p'
SAC_ND_PROP_OBJ_BOX( (SACl_scs, (SCL, (NHD, (NUQ, (INT, (GLO, (FPM, (NOT, )))))))), (SACl_scs, (SCL, (NHD...
^
/Volumes/Users/sbs/sac2c//include/sac.h:3959:48: note: expanded from macro 'SAC_ND_PROP_OBJ_BOX'
#define SAC_ND_PROP_OBJ_BOX( boxed, unboxed) *SAC_NAMEP( SAC_ND_A_FIELD( boxed)) = SAC_ND_A_FIELD( unboxed);
^
/Volumes/Users/sbs/sac2c//include/sac.h:785:27: note: expanded from macro 'SAC_NAMEP'
#define SAC_NAMEP( name) CAT0( name, __p)
^
/Volumes/Users/sbs/sac2c//include/sac.h:250:21: note: expanded from macro 'CAT0'
#define CAT0( x, y) xCAT0( x, y)
^
/Volumes/Users/sbs/sac2c//include/sac.h:251:22: note: expanded from macro 'xCAT0'
#define xCAT0( x, y) x##y
^
<scratch space>:18:1: note: expanded from here
SACl_scs__p
^
fun3.c:1362:261: warning: implicit declaration of function 'NONE' is invalid in C99 [-Wimplicit-function-declaration]
...(NOT, )))))))), (SACp_mtspmdfanon_2734_scs, (SCL, (NHD, (NUQ, (INT, (GLO, (NON, (NOT, )))))))), int, ND, NONE);
^
/Volumes/Users/sbs/sac2c//include/sac.h:4167:190: note: expanded from macro 'SAC_MT_SYNC_FOLD_out'
...CAT_M4_mt_gen_20(NT_SHP(nt), NT_HID(nt)))( arg1, arg2, nt , gra1, gra2, gra3, gra4)
^
/Volumes/Users/sbs/sac2c//include/sac.h:4168:71: note: expanded from macro 'SAC_MT_SYNC_FOLD_out_SCLNHD'
#define SAC_MT_SYNC_FOLD_out_SCLNHD(...) SAC_MT_SYNC_FOLD_out__NODESC(__VA_ARGS__)
^
/Volumes/Users/sbs/sac2c//include/sac.h:3920:189: note: expanded from macro 'SAC_MT_SYNC_FOLD_out__NODESC'
...foldfun) SAC_MT_RECEIVE_RESULT_out__NODESC( spmdfun, SAC_MT_son_id, num, val_NT); SAC_##tag##_FUNAP2( foldfun...
^
/Volumes/Users/sbs/sac2c//include/sac.h:661:35: note: expanded from macro 'SAC_ND_FUNAP2'
#define SAC_ND_FUNAP2( name, ...) name(__VA_ARGS__);
^
1 warning and 2 errors generated.
abort: System failed to execute shell command
abort: cd /tmp/SAC_trU5a4; gcc -pedantic -Wall -Wno-unused -fno-builtin -march=native -mtune=native
abort: -I$SAC2CBASE/include/ -O3 -c fun3.c -o fun3_nonpic.o
abort: with exit code 1
compilation failed while Creating binary code, 1 warning(s).</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1908state in WL problem2017-11-19T21:38:30ZSven-Bodo Scholzstate in WL problem| | |
| --- | --- |
| Bugzilla Link | [1132](http://bugs.sac-home.org/show_bug.cgi?id=1132) |
| Created on | Sep 18, 2014 14:14 |
| Resolution | FIXED |
| Resolved on | Sep 18, 2014 17:30 |
| Version | svn |
| OS | All |
| Architecture...| | |
| --- | --- |
| Bugzilla Link | [1132](http://bugs.sac-home.org/show_bug.cgi?id=1132) |
| Created on | Sep 18, 2014 14:14 |
| Resolution | FIXED |
| Resolved on | Sep 18, 2014 17:30 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1130.sac](/uploads/2e93e159c2d3232f0b3913beb22ea804/1130.sac), [out](/uploads/76b489deb5e937d460e9c08f1193ec5b/out), [bound.sac](/uploads/8597f2427b4885ca5974916bd8ca9694/bound.sac) |
## Extended Description
<pre>Created an attachment (id=1016)
source code that fails; requires further class
This bug may be the same as 1130; but it shows a different symptom.
Error message is related to low-level code generation actual message in attachment.</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2130illegal module name crashes scanner parser iff followed by a use....2017-11-19T22:00:53ZSven-Bodo Scholzillegal module name crashes scanner parser iff followed by a use....| | |
| --- | --- |
| Bugzilla Link | [1131](http://bugs.sac-home.org/show_bug.cgi?id=1131) |
| Created on | Sep 18, 2014 11:32 |
| Resolution | FIXED |
| Resolved on | Sep 29, 2014 15:47 |
| Version | svn |
| OS | All |
| Architecture...| | |
| --- | --- |
| Bugzilla Link | [1131](http://bugs.sac-home.org/show_bug.cgi?id=1131) |
| Created on | Sep 18, 2014 11:32 |
| Resolution | FIXED |
| Resolved on | Sep 29, 2014 15:47 |
| Version | svn |
| OS | All |
| Architecture | PC |
## Extended Description
<pre>Compile this:
module 1131;
use Array: all;
without any command line parameters...... leads to
sac2c-d 1131.sac
** 1: Loading SAC program ...
**** Locating source code ...
Reading from file "./1131.sac" ...
**** Running C preprocessor ...
**** Parsing input file ...
./1131.sac 1:8 error:
=> token of class `id' expected, `1131' token found
OOOOOOOPS, your program crashed the compiler 8-((</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1209mt on fold+propagate- WL fails2022-11-20T12:08:54ZSven-Bodo Scholzmt on fold+propagate- WL fails| | |
| --- | --- |
| Bugzilla Link | [1130](http://bugs.sac-home.org/show_bug.cgi?id=1130) |
| Created on | Sep 05, 2014 16:25 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1130.sac](/uploads/78975b79b1f47e2f...| | |
| --- | --- |
| Bugzilla Link | [1130](http://bugs.sac-home.org/show_bug.cgi?id=1130) |
| Created on | Sep 05, 2014 16:25 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [1130.sac](/uploads/78975b79b1f47e2f0af8a8f57395cc0a/1130.sac), [bound.sac](/uploads/c803bb095ff1d6ea5cc14faf8168d0ae/bound.sac) |
## Extended Description
<pre>Created an attachment (id=1013)
failing program
Sharing a counter on a genarray WL works but on a fold WL fails.
sac2c -v1 -mt -doWLLO -minmtsize 40 simple.sac
./maxclique.sac 93:3 error:
=> Pragma 'linksign' illegal: mappings allowed exclusively between parameters with identical types
compilation failed while Preparing C code generation, 1 error(s).
make: *** [simple] Error 99</pre>Clemens GrelckClemens Grelckhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1275ipbb.sac: POGO fails to remove guard due to no extrema on induction variable2017-11-19T20:35:05ZRobert Berneckyipbb.sac: POGO fails to remove guard due to no extrema on induction variable| | |
| --- | --- |
| Bugzilla Link | [1129](http://bugs.sac-home.org/show_bug.cgi?id=1129) |
| Created on | Sep 04, 2014 22:05 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | [ipbb.sac](/uploads/1bb72846bec0cf...| | |
| --- | --- |
| Bugzilla Link | [1129](http://bugs.sac-home.org/show_bug.cgi?id=1129) |
| Created on | Sep 04, 2014 22:05 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | [ipbb.sac](/uploads/1bb72846bec0cfc6a16c3acb44a5b8ca/ipbb.sac) |
## Extended Description
<pre>Created an attachment (id=1012)
Source code to reproduce fault
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18604
(Thu Sep 4 16:26:21 EDT 2014 by sac)
The ipbb.sac test case in the polylib unit tests fails, because
PETL does not compute extrema for the induction variable, colx.
The polylib UnitTestRunGreps otherwise runs clean.
UnitTestRunWorks fails due to linker problems, still unresolved.</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1168sac2c gets uppity about object filename after Mull2017-11-19T20:26:08ZRobert Berneckysac2c gets uppity about object filename after Mull| | |
| --- | --- |
| Bugzilla Link | [1128](http://bugs.sac-home.org/show_bug.cgi?id=1128) |
| Created on | Aug 07, 2014 18:03 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>This puzzles me. I ...| | |
| --- | --- |
| Bugzilla Link | [1128](http://bugs.sac-home.org/show_bug.cgi?id=1128) |
| Created on | Aug 07, 2014 18:03 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>This puzzles me. I have no idea why naming an object file should
affect itslinkability. In the following, the only difference
is that one compile specifies the name of the object file, while
the other uses the default value:
sac@rattler:~/sac/testsuite/optimizations/awlf$ rm a.out sumrotateiotaAKSAKD.sac.exe
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c -v0 -target seq -doawlf -nowlf -noctz -doscwlf sumrotateiotaAKSAKD.sac
sac@rattler:~/sac/testsuite/optimizations/awlf$ a.out; echo $?
0
sac@rattler:~/sac/testsuite/optimizations/awlf$ sac2c -v0 -target seq -doawlf -nowlf -noctz -doscwlf sumrotateiotaAKSAKD.sac -o sumrotateiotaAKSAKD.sac.exe
sac@rattler:~/sac/testsuite/optimizations/awlf$ ./sumrotateiotaAKSAKD.sac.exe ; echo $?./sumrotateiotaAKSAKD.sac.exe: error while loading shared libraries: libArrayMod.so: cannot open shared object file: No such file or directory
127
Compiling with "-o a.out " also causes the loader to fail.
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
product rev 18604
(Wed Aug 6 16:04:14 EDT 2014 by sac)</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1255CF failure: SCSprf_val_lt_val_SxS evaporates val_lt_val_SxS_( const, const) g...2017-11-19T20:33:54ZRobert BerneckyCF failure: SCSprf_val_lt_val_SxS evaporates val_lt_val_SxS_( const, const) guard| | |
| --- | --- |
| Bugzilla Link | [1127](http://bugs.sac-home.org/show_bug.cgi?id=1127) |
| Created on | Jul 23, 2014 21:22 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I just stumbled acr...| | |
| --- | --- |
| Bugzilla Link | [1127](http://bugs.sac-home.org/show_bug.cgi?id=1127) |
| Created on | Jul 23, 2014 21:22 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I just stumbled across this failure.
The offending code had been copy/pasted from the val_le_val_SxS code,
and I missed Case 2 now being rubbish. There is also at least two COlt calls
that are also rubbbish.
Fix to come over the weekend.
Failing code:
int[*] id(int[*] y)
{
return( y);
}
int main()
{
x = 0;
y = id(1);
y, p = _non_neg_val_S_( y);
z, p = _val_lt_val_SxS_( x, y);
return( z);
}</pre>Robert BerneckyRobert Berneckyhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1167Post-Mull DevCamp oddities2017-11-19T20:26:05ZRobert BerneckyPost-Mull DevCamp oddities| | |
| --- | --- |
| Bugzilla Link | [1126](http://bugs.sac-home.org/show_bug.cgi?id=1126) |
| Created on | Jul 16, 2014 19:11 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I'm trying to get m...| | |
| --- | --- |
| Bugzilla Link | [1126](http://bugs.sac-home.org/show_bug.cgi?id=1126) |
| Created on | Jul 16, 2014 19:11 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>I'm trying to get my development box here back on its wheels, and
have run into a number of anomalies that I'll report here:
1. cd sac2c; make clean:
Removing compilation target: bin/sacprapolyhedral
/bin/bash: bin/sac2c: No such file or directory
./src/makefiles/rtlibs.mkf:23: ** Warning: SAC2CRC=${SAC2CRC:-setup/sac2crc} LD_LIBRARY_PATH=lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} bin/sac2c does not appear to work - cannot determine SBI data, skipping
make[1]: Nothing to be done for `clean'.
/bin/bash: bin/sac2c: No such file or directory
./src/makefiles/rtlibs.mkf:23: ** Warning: SAC2CRC=${SAC2CRC:-setup/sac2crc} LD_LIBRARY_PATH=lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} DYLD_LIBRARY_PATH=lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} bin/sac2c does not appear to work - cannot determine SBI data, skipping
make[1]: Nothing to be done for `clean'.
2. cd sac2c; make:
Codeveloper code: annotate_memory_transfers.c
..
Compiling executionmode.c: In function ‘CUTEMassign’:
cuda/cuda_tag_executionmode.c:597:18: warning: comparison between ‘cudaexecmode_t’ and ‘enum <anonymous>’ [-Wenum-compare]
if( old_mode == CUDA_DEVICE_SINGLE &&
^
Compiling developer code: prepare_forloop_generation.c
Compiling developer code: cuda_create_cells.c
Compiling developer code: minimize_cudast_transfers.c
Compiling developer code: single_thread_kernels.c
Compiling developer code: adjust_stknl_rets.c
cuda/cuda_create_cells.c: In function ‘CUCCassign’:
cuda/cuda_create_cells.c:90:34: warning: comparison between ‘mtexecmode_t’ and ‘enum <anonymous>’ [-Wenum-compare]
if( ASSIGN_EXECMODE( arg_node) == CUDA_DEVICE_SINGLE) {
^
cuda/cuda_create_cells.c:97:60: warning: comparison between ‘mtexecmode_t’ and ‘enum <anonymous>’ [-Wenum-compare]
ASSIGN_EXECMODE( ASSIGN_NEXT( last_cellassign)) == CUDA_DEVICE_SINGLE) {
...
3. cd sac2c; make
Linking bin/sac2c-d (developer version)
'/home/sac/.sac2crc' not found or not readable, skipping.
MT_MODE = 0 in target, forcing -numthreads to 1.
'/home/sac/.sac2crc' not found or not readable, skipping.
MT_MODE = 0 in target, forcing -numthreads to 1.
'/home/sac/.sac2crc' not found or not readable, skipping.
MT_MODE = 0 in target, forcing -numthreads to 1.
'/home/sac/.sac2crc' not found or not readable, skipping.
MT_MODE = 0 in target, forcing -numthreads to 1.
'/home/sac/.sac2crc' not found or not readable, skipping.
MT_MODE = 0 in target, forcing -numthreads to 1.
'/home/sac/.sac2crc' not found or not readable, skipping.
MT_MODE = 0 in target, forcing -numthreads to 1.
** INFO: target 'seq' does *not* support PHM.
[I don't see the rationale for a connection between 'seq" and PHM, btw.]
4. a bit further on...
LD bin/csimt
'/home/sac/.sac2crc' not found or not readable, skipping.
'/home/sac/.sac2crc' not found or not readable, skipping.
'/home/sac/.sac2crc' not found or not readable, skipping.
'/home/sac/.sac2crc' not found or not readable, skipping.
'/home/sac/.sac2crc' not found or not readable, skipping.
'/home/sac/.sac2crc' not found or not readable, skipping.
** INFO: target 'mt_pth' does support PHM.
5, I think I had DISLIN working here before, and it still lives
in /usr/local/dislin. However, stdlib comes up with this:
Making all for target mt_pth
** Note: modules Dislin DislinBars DislinQuick DislinCanvas DislinPage DislinPlot3d DislinSystem disabled due to configuration.
6. Once I got stdlib built, I tried a few unit tests:
cd ~/sac/testsuite/optimizations/rcopt
sac2 bug1107.sac
/usr/local/lib/sac2c/18604/rt/host/seq/libsac.so: undefined reference to `SAC_HM_ShowDiagnostics'
collect2: error: ld returned 1 exit status
abort: System failed to execute shell command
abort: gcc -std=gnu99 /tmp/SAC_ZGPsKC/a.out.o
abort: -L/usr/local/lib/sac2c/18604/modlibs/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/18604/modlibs/host/seq
abort: -L/usr/local/lib/sac2c/18604/modlibs/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/18604/modlibs/host/seq -L./host/seq
abort: -Wl,-rpath,./host/seq -L/usr/local/lib/sac2c/18604/rt/host/seq
abort: -Wl,-rpath,/usr/local/lib/sac2c/18604/rt/host/seq -lArrayMod
abort: -lArrayTransformMod -lConstantsMod -lArrayArithMod -lArrayBasicsMod -lBoolMod
abort: -lScalarArithMod -lsacpreludeMod -L/usr/local/dislin
abort: -Wl,-rpath,/usr/local/dislin -L/opt/local/lib -Wl,-rpath,/opt/local/lib
abort: -lsacphmc -lsac -lsacphmc -o a.out
abort: with exit code 1
^
I am guessing that HM is for Heap Manager.
7. Let's try some other unit tests:
cd sac/testsuite/optimizations/polylib
sac2c -v0 -target seq -O3 guard_val_lt_val_S.sac -o guard_val_lt_val_S.sac.exe -check c -doawlf -nowlf -dopogo -noggs
sac@rattler:~/sac/testsuite/optimizations/polylib$ guard_val_lt_val_S.sac.exe ; echo $?guard_val_lt_val_S.sac.exe: error while loading shared libraries: libsac.so: cannot open shared object file: No such file or directory
These failures are all new post-Mull.
The host and target system is an Ubuntu 14.10LTS system.
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
product rev 18604
(Tue Jul 15 15:06:15 EDT 2014 by sac)</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2129Lexer is not lexing numbers very well2017-11-19T22:00:48ZArtem ShinkarovLexer is not lexing numbers very well| | |
| --- | --- |
| Bugzilla Link | [1125](http://bugs.sac-home.org/show_bug.cgi?id=1125) |
| Created on | Jul 11, 2014 09:25 |
| Resolution | FIXED |
| Resolved on | Sep 26, 2015 17:13 |
| Version | svn |
| OS | All |
| Architecture...| | |
| --- | --- |
| Bugzilla Link | [1125](http://bugs.sac-home.org/show_bug.cgi?id=1125) |
| Created on | Jul 11, 2014 09:25 |
| Resolution | FIXED |
| Resolved on | Sep 26, 2015 17:13 |
| Version | svn |
| OS | All |
| Architecture | All |
## Extended Description
<pre>While fixing bug 1064 I found several inconsistencies in the way lexer treats numbers.
$ cd $SAC2CBASE/src/libsac2c/scanparse
$ gcc -g -o lex -std=c99 -D_GNU_SOURCE -DLEXER_BINARY lex.c trie.c
Test[1]:
$ echo -n "123axa" | ./lex /dev/stdin
/dev/stdin 1:1 number ['123']
/dev/stdin 1:4 id ['axa']
This means that if we potentially mistyped a certain prefix, it will treat the sequence as two tokens. Shouldn't matter in practise but GCC for example gives the error message like:
invalid suffix "axa" on integer constant
we can do something similar.
Test[2]:
echo -n ".23f " | ./lex /dev/stdin
/dev/stdin 1:1 operator ['.']
/dev/stdin 1:2 number_float ['23']
/dev/stdin 1:5 whitespace [' ']
That indicates that .23 which would be a valid number in C is not supported.
Test[3]:
$ echo -n ".23" | ./lex /dev/stdin
/dev/stdin 1:1 operator ['.']
/dev/stdin error:1:4 unexpected end of file
/dev/stdin 1:2 unknown ['23'] !unknown
That seem to be a bug! We never hit this as we don't use numbers at the end of the file, but it should *not* happen.
Test[4]:
$ echo -n "0.f" | ./lex /dev/stdin
/dev/stdin error:1:3 digit expexted, 'f' found instead
/dev/stdin 1:1 unknown ['0.'] !unknown
/dev/stdin 1:3 id ['f']
It doesn't like suffixes after the dot, which is legal in C.
It would be nice to match the way number are treated in C with SaC and add suffixes for integer constants (b,l,u,...) on top.</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1166Typecasting fails2017-11-19T20:26:02ZArtem ShinkarovTypecasting fails| | |
| --- | --- |
| Bugzilla Link | [1124](http://bugs.sac-home.org/show_bug.cgi?id=1124) |
| Created on | Jul 10, 2014 17:57 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | ![feedsmall](/uploads/951458f2202c...| | |
| --- | --- |
| Bugzilla Link | [1124](http://bugs.sac-home.org/show_bug.cgi?id=1124) |
| Created on | Jul 10, 2014 17:57 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | ![feedsmall](/uploads/951458f2202c2c123f5d581da067ed1a/feedsmall.bmp), [rgb.sac](/uploads/4fb75265545a2cd4ec733ec00f9fabae/rgb.sac), [program.sac](/uploads/7732fcf19dde9e4ea1c9ec931d7115bd/program.sac) |
## Extended Description
<pre>Here is an experiment:
We define a type called rgb in the module called rgb.sac like this:
$ cat -n rgb.sac
1 module rgb;
2
3 export all;
4 typedef int[3] rgb;
5
6 int[.] shape (rgb[.,.] a)
7 {
8 return Array::drop ([Array::- 1], Array::shape ((int[.,.,.])a));
9 }
We also define the shape function.
Now the main progam looks like this:
$ cat -n program.sac
1 use String: {string};
2 use BMP: all;
3 use rgb: all;
4
5 rgb[.,.] my_readBMP( string name)
6 {
7 img = BMP::readBMP( name);
8 StdIO::print (Color8::shape (img));
9 b = (int[.,.,.])img;
10 StdIO::print (Array::shape (b));
11 a = (rgb[.,.])b;
12 StdIO::print (shape (a));
13 return a;
14 }
15
16 int main()
17 {
18 img = my_readBMP("feedsmall.bmp");
19 StdIO::print (shape (img));
20 return 0;
21 }
and the output of the program is this:
$ ./a.out
Dimension: 1
Shape : < 2>
<10 10 >
Dimension: 1
Shape : < 3>
<10 10 3 >
Dimension: 1
Shape : < 0>
<>
Dimension: 1
Shape : < 3>
<10 10 22851456 >
So, as you can see, the shape information after the typecast to rgb[.,.] type is wrong. If we inline the shape in rgb, the problem goes away. If we introduce object references inside the shape, the problem goes away:
int[.] shape (rgb[.,.] a)
{
sh= Array::drop ([Array::- 1], Array::shape ((int[.,.,.])a));
StdIO::print (sh);
return sh;
}
O_o</pre>BugZillaBugZillahttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2128Parser fails with assertion when the variable is named the same as type2017-11-19T22:00:43ZArtem ShinkarovParser fails with assertion when the variable is named the same as type| | |
| --- | --- |
| Bugzilla Link | [1123](http://bugs.sac-home.org/show_bug.cgi?id=1123) |
| Created on | Jul 10, 2014 17:29 |
| Resolution | FIXED |
| Resolved on | Jul 10, 2014 21:49 |
| Version | svn |
| OS | Linux |
| Architectu...| | |
| --- | --- |
| Bugzilla Link | [1123](http://bugs.sac-home.org/show_bug.cgi?id=1123) |
| Created on | Jul 10, 2014 17:29 |
| Resolution | FIXED |
| Resolved on | Jul 10, 2014 21:49 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>The program that fails:
1 typedef int[3] rgb;
2
3 rgb sel (int[.] iv, rgb[.,.])
4 {
5 }
./t.sac 3:29 error:
=> token ) cannot start a function argument name
Internal compiler error
Assertion "id" failed at scanparse/parser.c:4709 -- id cannot be NULL here
Please file a bug at: http://bugs.sac-home.org
The problem is that the argument name is missing.
The parser should not hit the assertion.</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1165reference counting in parallel fold goes wrong2020-11-08T17:05:47ZSven-Bodo Scholzreference counting in parallel fold goes wrong| | |
| --- | --- |
| Bugzilla Link | [1122](http://bugs.sac-home.org/show_bug.cgi?id=1122) |
| Created on | Jun 19, 2014 09:42 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [tutu.sac](/uploads/32319dd42a1d9641...| | |
| --- | --- |
| Bugzilla Link | [1122](http://bugs.sac-home.org/show_bug.cgi?id=1122) |
| Created on | Jun 19, 2014 09:42 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [tutu.sac](/uploads/32319dd42a1d96416fa10bb2f3fc91b2/tutu.sac) |
## Extended Description
<pre>Created an attachment (id=1008)
source file
compiling the attached example with -mt leads to double free error when executed in parallel.</pre>BugZillaBugZilla