New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc-13 runtime error #461
Comments
Thank you for your report! I have confirmed the same FORM runtime error with GCC 13.2.0. I am not sure whether GCC 13 finds a pitfall in the FORM code (e.g., legal optimization with undefined behaviour) or it is just a bug of GCC, but it seems that making diff --git a/sources/names.c b/sources/names.c
index fd01e89..9ae586f 100644
--- a/sources/names.c
+++ b/sources/names.c
@@ -1666,7 +1666,8 @@ static int nwarntab = 1;
int DoTable(UBYTE *s, int par)
{
GETIDENTITY
- UBYTE *name, *p, *inp, c;
+ UBYTE *name, *p, *inp;
+ volatile UBYTE c;
int i, j, k, sparseflag = 0, rflag = 0, checkflag = 0;
int error = 0, ret, oldcbufnum, oldEside;
WORD funnum, type, *OldWork, *w, *ww, *t, *tt, *flags1, oldnumrhs,oldnumlhs; Maybe we need C (and/or GCC) experts... |
Posted a related question on StackOverflow. |
To summarize the discussion on StackOverflow, this is a GCC 13 bug and will be fixed in 13.3.0. So, I close this issue. Meanwhile, we must not forget to run |
I've run Thanks for looking into it. |
I was building (t)form on my machine which is currently using
gcc (GCC) 13.2.1 20230801
and found an error.The compilation is completed without any issues (except some warnings see form_build_gcc13.log)
Most programs run just fine, but I get an error with tables. By running
I get
I've tried to build
form-5.0.0
,form-4.3.1
,form-4.3.0
but the issue is consistent.It all disappear when I compile with
gcc-12 (GCC) 12.3.0
by runningCC=gcc-12 CXX=g++-12 ./configure
Then the program runs as expected.
I've also tried to enable debugging but then
vorm
runs without issues.So I've tried to compile with a lower optimization level and I found that
-O2
and-O3
are the ones producing the issueI'm unsure if this is a problem in the
gcc
compiler or something being exposed only at this level.It could also be that the version I'm using is not completely stable.
I also didn't have the opportunity to try to reproduce it on another machine
I'm attaching also the output from
make form
using bothgcc-12
andgcc-13
:form_build_gcc13.log
form_build_gcc12.log
The text was updated successfully, but these errors were encountered: