On 12/1/21 15:18, grischka wrote:
Got this report on private email.  Not sure what it means ...
---------------------------------------------------------->>

Output of the code below if compiled with TCC is pretty messy:
array values are "misplaced" and overwrite each other.
But everything's ok if compiled with GCC.


The patch below seems to fix it. Can I push it?

    Herman

diff --git a/tccgen.c b/tccgen.c
index e0b5fd6..67e205b 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -3494,7 +3494,7 @@redo:
                gen_cast_s(VT_INT);
#endif
            type1 = vtop[-1].type;
-            if (vtop[-1].type.t & VT_VLA)
+            if (vtop[-1].type.ref->type.t & VT_VLA)
                vla_runtime_pointed_size(&vtop[-1].type);
            else {
                u = pointed_size(&vtop[-1].type);

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to