sac2c issueshttps://gitlab.sac-home.org/sac-group/sac2c/-/issues2017-11-19T22:01:42Zhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/2141TC ignores type error in dead code2017-11-19T22:01:42ZClemens GrelckTC ignores type error in dead code| | |
| --- | --- |
| Bugzilla Link | [796](http://bugs.sac-home.org/show_bug.cgi?id=796) |
| Created on | Dec 08, 2010 15:35 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>In the code from the ...| | |
| --- | --- |
| Bugzilla Link | [796](http://bugs.sac-home.org/show_bug.cgi?id=796) |
| Created on | Dec 08, 2010 15:35 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
## Extended Description
<pre>In the code from the latest SAC user:
import Array: all;
import StdIO: all;
typedef int[1] array;
int main()
{
array x;
x = 10;
#ifndef EXCLUDE_ERRORS
print(x);
#endif
return(0);
}
the obvious type error goes away if x becomes dead code.
I traced this in so far as until the tc there is a proper
type conversion, which in my view should lead to an error
message, but after type checking this is gone.
This is very counter-intuitive for the user and an error
for me.</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1316conditionals are sometimes over-optimised2017-11-19T20:38:06ZSven-Bodo Scholzconditionals are sometimes over-optimised| | |
| --- | --- |
| Bugzilla Link | [1187](http://bugs.sac-home.org/show_bug.cgi?id=1187) |
| Created on | Jan 12, 2017 16:27 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [sacprelude_d.sacbugreport](/uploads...| | |
| --- | --- |
| Bugzilla Link | [1187](http://bugs.sac-home.org/show_bug.cgi?id=1187) |
| Created on | Jan 12, 2017 16:27 |
| Version | svn |
| OS | All |
| Architecture | PC |
| Attachments | [sacprelude_d.sacbugreport](/uploads/b8377a445927ee15e870784fc166faeb/sacprelude_d.sacbugreport) |
## Extended Description
<pre>noinline int forever( int x)
{
if( _eq_SxS_( x,0))
res = forever(x);
else
res = 42;
return res;
}
int main() {
return forever( 0);
}
after optimisation yields 42 :-(
What happens is that the type of the function forever is computed as int{42}. The constant folder reacts and throws the conditional away.....</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1274TC isn't much help in error reporting2017-11-19T20:35:01ZRobert BerneckyTC isn't much help in error reporting| | |
| --- | --- |
| Bugzilla Link | [1102](http://bugs.sac-home.org/show_bug.cgi?id=1102) |
| Created on | Nov 10, 2013 19:16 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | [ipddStar.sac](/uploads/929ac54e22...| | |
| --- | --- |
| Bugzilla Link | [1102](http://bugs.sac-home.org/show_bug.cgi?id=1102) |
| Created on | Nov 10, 2013 19:16 |
| Version | svn |
| OS | Linux |
| Architecture | PC |
| Attachments | [ipddStar.sac](/uploads/929ac54e22e8c59af850da692e3a97e3/ipddStar.sac) |
## Extended Description
<pre>Created an attachment (id=995)
source code to reproduce fault
sac2c ipddStar.sac -v1
typecheck/new_types.c:904 Assertion "(NTYPE_CON(array) == TC_aks) || (NTYPE_CON(array) == TC_akv) || (NTYPE_CON(array) == TC_akd) || (NTYPE_CON(array) == TC_audgz) || (NTYPE_CON(array) == TC_aud)" failed!
TYgetScalar applied to other than array type!
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 18410 linux-gnu_x86_64
(Sat Nov 9 16:39:54 EST 2013 by sac)
The problem is in this line:
Crow = plusDDD( toD( y[colx]), Crow );
plusDDD() exists, but only for scalar-scalar arguments;
the code wants a vector-vector function, but it does not
exist. It would be nice if it told us that.</pre>Sven-Bodo ScholzSven-Bodo Scholzhttps://gitlab.sac-home.org/sac-group/sac2c/-/issues/1093Mandelbrot compilation fails with assertion2017-11-19T20:21:46ZFrank PenczekMandelbrot compilation fails with assertion| | |
| --- | --- |
| Bugzilla Link | [840](http://bugs.sac-home.org/show_bug.cgi?id=840) |
| Created on | Mar 30, 2011 22:09 |
| Version | svn |
| OS | All |
| Architecture | PC |
## Extended Description
<pre>tested with sac2c
- rev...| | |
| --- | --- |
| Bugzilla Link | [840](http://bugs.sac-home.org/show_bug.cgi?id=840) |
| Created on | Mar 30, 2011 22:09 |
| Version | svn |
| OS | All |
| Architecture | PC |
## Extended Description
<pre>tested with sac2c
- rev. 17365 on linux
- rev. 17229 on mac
"make" in "sac/tutorial/L8_case-study_mandelbrot" produces:
sac2c -v 1 -O3 -nophm -o mandelbrot mandelbrot.sac
ASSERTION FAILED: file 'typecheck/elim_alpha_types.c', line 456
new element type of array does not match old type!
EXECUTION TERMINATED
make: *** [mandelbrot] Aborted
rm -rf mandelbrot.c
[...]
The error repeats for all .sac files in this directory.
Apologies if this this is a known (and already filed) bug.</pre>BugZillaBugZilla