Skip to content
Snippets Groups Projects
Commit 0929f236 authored by erwan's avatar erwan
Browse files

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

parent bce7b883
No related branches found
Tags v6.106.1
No related merge requests found
Pipeline #102575 passed
(* 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 = *) (* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
...@@ -1016,24 +1016,24 @@ typedef float _float; ...@@ -1016,24 +1016,24 @@ typedef float _float;
puth "\n#include <stdio.h>"; puth "\n#include <stdio.h>";
puth "\n#include <stdlib.h>"; puth "\n#include <stdlib.h>";
puth "\n#include <string.h>\n"; 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\""; puth "#include \"lustre_consts.h\"";
output_string och (" output_string och ("
// User typedef // User typedef
#ifndef _"^base0^"_TYPES #ifndef _"^base0^"_TYPES
#define _"^base0^"_TYPES\n"); #define _"^base0^"_TYPES\n");
output_string och (user_typedef licprg); flush och; output_string och (user_typedef licprg); flush och;
output_string och ((typedef_all licprg stbl main_soc ) output_string och ((typedef_all licprg stbl main_soc )
^ "#endif // end of _"^base0^"_TYPES ^ "#endif // end of _"^base0^"_TYPES
" ");
^ (if needs_hfile then "#include \""^ base0 ^"_ext.h\"\n" else ""));
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 try
Lv6util.entete occ "/*" "*/" ; Lv6util.entete occ "/*" "*/" ;
if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_dro then () else if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_dro then () else
......
==> lus2lic0.sum <== ==> 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 Native configuration is x86_64-pc-linux-gnu
=== lus2lic0 tests === === lus2lic0 tests ===
...@@ -66,7 +66,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte ...@@ -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 XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <== ==> 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 Native configuration is x86_64-pc-linux-gnu
=== lus2lic1 tests === === lus2lic1 tests ===
...@@ -626,7 +626,7 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {} ...@@ -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 {} PASS: /home/jahier/lus2lic/test/../utils/compare_lv6_and_lv6_en multipar.lus {}
==> lus2lic2.sum <== ==> 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 Native configuration is x86_64-pc-linux-gnu
=== lus2lic2 tests === === lus2lic2 tests ===
...@@ -1171,7 +1171,7 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_lv6_and_lv6_en zzz2.lus {} ...@@ -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 {} PASS: /home/jahier/lus2lic/test/../utils/compare_gcc_and_clang zzz2.lus {}
==> lus2lic3.sum <== ==> 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 Native configuration is x86_64-pc-linux-gnu
=== lus2lic3 tests === === lus2lic3 tests ===
...@@ -1686,7 +1686,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {} ...@@ -1686,7 +1686,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <== ==> 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 Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests === === lus2lic4 tests ===
...@@ -2211,11 +2211,11 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_gcc_and_clang multipar.lus {} ...@@ -2211,11 +2211,11 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_gcc_and_clang multipar.lus {}
=============================== ===============================
# Total number of failures: 17 # Total number of failures: 17
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 352 seconds lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 353 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 389 seconds lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 412 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 71 seconds lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 70 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 89 seconds lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 62 seconds
* Ref time: * Ref time:
323.65user 78.07system 15:01.63elapsed 44%CPU (0avgtext+0avgdata 77252maxresident)k 322.91user 81.61system 14:58.21elapsed 45%CPU (0avgtext+0avgdata 77544maxresident)k
143424inputs+458920outputs (454major+19444018minor)pagefaults 0swaps 50792inputs+458048outputs (203major+19437060minor)pagefaults 0swaps
* Quick time (-j 4): * Quick time (-j 4):
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment