Martin Liddle wrote:
I am experimenting with gpc 20021128 built with gcc 3.2.1. However I have a compilation problem. The following code fails to compile with the error message:
ml.p:12: passing arg1 of Sys_stat from incompatible array.
The code compiles OK under 20020426 based on gcc 2.95.2.
Am I doing something wrong or is this a bug? (Note if the function rmdir line is commented out in ml2 then the program compiles. If the code of ml2 is merged with ml then the code compiles).
I can reproduce the problem and will try to fix it (martin6.pas). Thanks for the report.
--- orig/module.c Fri Dec 6 15:51:22 2002 +++ p/module.c Sun Dec 15 05:14:20 2002 @@ -2796,6 +2796,10 @@ t = build_simple_array_type (type, domain); if (packed) flag_pack_struct = save_flag_pack_struct; + copy_flags (t, flags); + copy_type_flags (&t0, t); + if (packed) + t = grok_packed (t);
t1 = mark_node_loaded (t, uid); if (t1 != t) @@ -2803,10 +2807,6 @@ mseek (rb.infile, save_pos); return t1; } - copy_flags (t, flags); - copy_type_flags (&t0, t); - if (packed) - t = grok_packed (t); load_main_variant (t); break; }
Frank