Commit 0929f236 authored by erwan's avatar erwan
Browse files

fix: a bug in the C code in presence of extern functions

parent bce7b883
Pipeline #102575 passed with stages
in 5 minutes and 11 seconds
(* Time-stamp: <modified the 06/05/2022 (at 10:29) by Erwan Jahier> *)
(* Time-stamp: <modified the 20/06/2022 (at 17:49) by Erwan Jahier> *)
(* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
......@@ -1016,24 +1016,24 @@ typedef float _float;
puth "\n#include <stdio.h>";
puth "\n#include <stdlib.h>";
puth "\n#include <string.h>\n";
if needs_hfile || args.Lv6MainArgs.ext_types then (
puth (Printf.sprintf "#ifndef _%s_H_FILE\n" base0);
puth (Printf.sprintf "#include \"%s\"\n" ext_hfile0);
puth (Printf.sprintf "#define _%s_H_FILE\n" base0);
puth "#endif\n";
);
puth "#include \"lustre_consts.h\"";
output_string och ("
// User typedef
#ifndef _"^base0^"_TYPES
#define _"^base0^"_TYPES\n");
output_string och (user_typedef licprg); flush och;
output_string och ((typedef_all licprg stbl main_soc )
^ "#endif // end of _"^base0^"_TYPES
"
^ (if needs_hfile then "#include \""^ base0 ^"_ext.h\"\n" else ""));
^ "#endif // end of _"^base0^"_TYPES
");
if needs_hfile || args.Lv6MainArgs.ext_types then (
puth (Printf.sprintf "\n#ifndef _%s_H_FILE\n" base0);
puth (Printf.sprintf "#include \"%s\"\n" ext_hfile0);
puth (Printf.sprintf "#define _%s_H_FILE\n" base0);
puth (Printf.sprintf "#endif // _%s_H_FILE\n\n" base0);
);
try
Lv6util.entete occ "/*" "*/" ;
if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_dro then () else
......
==> lus2lic0.sum <==
Test run by jahier on Wed Jun 15 15:01:24
Test run by jahier on Mon Jun 20 17:30:38
Native configuration is x86_64-pc-linux-gnu
=== lus2lic0 tests ===
......@@ -66,7 +66,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <==
Test run by jahier on Wed Jun 15 15:01:25
Test run by jahier on Mon Jun 20 17:30:39
Native configuration is x86_64-pc-linux-gnu
=== lus2lic1 tests ===
......@@ -626,7 +626,7 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
PASS: /home/jahier/lus2lic/test/../utils/compare_lv6_and_lv6_en multipar.lus {}
==> lus2lic2.sum <==
Test run by jahier on Wed Jun 15 15:07:17
Test run by jahier on Mon Jun 20 17:36:32
Native configuration is x86_64-pc-linux-gnu
=== lus2lic2 tests ===
......@@ -1171,7 +1171,7 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_lv6_and_lv6_en zzz2.lus {}
PASS: /home/jahier/lus2lic/test/../utils/compare_gcc_and_clang zzz2.lus {}
==> lus2lic3.sum <==
Test run by jahier on Wed Jun 15 15:13:46
Test run by jahier on Mon Jun 20 17:43:24
Native configuration is x86_64-pc-linux-gnu
=== lus2lic3 tests ===
......@@ -1686,7 +1686,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test run by jahier on Wed Jun 15 15:14:57
Test run by jahier on Mon Jun 20 17:44:34
Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests ===
......@@ -2211,11 +2211,11 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_gcc_and_clang multipar.lus {}
===============================
# Total number of failures: 17
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 352 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 389 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 71 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 89 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 353 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 412 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 70 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 62 seconds
* Ref time:
323.65user 78.07system 15:01.63elapsed 44%CPU (0avgtext+0avgdata 77252maxresident)k
143424inputs+458920outputs (454major+19444018minor)pagefaults 0swaps
322.91user 81.61system 14:58.21elapsed 45%CPU (0avgtext+0avgdata 77544maxresident)k
50792inputs+458048outputs (203major+19437060minor)pagefaults 0swaps
* Quick time (-j 4):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment