Skip to content
Snippets Groups Projects
Commit 65476dd0 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

CompiledDataDump.const_decl was wrong for enum constants.

parent 68afaf48
No related branches found
Tags 6.9.4
No related merge requests found
......@@ -255,8 +255,9 @@ let (const_decl: Ident.long -> const_eff -> string) =
"const " ^ (long tname) ^
(match ceff with
| Extern_const_eff _ -> ":" ^ (string_of_type_eff (type_of_const_eff ceff))
| Enum_const_eff _ -> "" (* enum const are defined as extern const *)
| _ -> " = " ^ (string_of_const_eff ceff)
) ^ ";\n"
) ^ ";\n"
let (node_of_node_exp_eff: node_exp_eff -> string) =
fun neff ->
......
......@@ -2197,12 +2197,12 @@ End of Syntax table dump.
type enum__couleur = enum {enum__bleu, enum__blanc, enum__rouge};
type enum__color = enum {enum__blue, enum__white, enum__redd};
Exported constants:
const enum__bleu = enum__bleu;
const enum__blanc = enum__blanc;
const enum__redd = enum__redd;
const enum__rouge = enum__rouge;
const enum__blue = enum__blue;
const enum__white = enum__white;
const enum__bleu;
const enum__blanc;
const enum__redd;
const enum__rouge;
const enum__blue;
const enum__white;
Exported nodes:
node enum__boo(
......@@ -5898,9 +5898,9 @@ const mainPack__N = 8;
type mainPack__T = int^8;
type mainPack__couleurs = enum {mainPack__bleu, mainPack__rose, mainPack__jaune};
Exported constants:
const mainPack__bleu = mainPack__bleu;
const mainPack__jaune = mainPack__jaune;
const mainPack__rose = mainPack__rose;
const mainPack__bleu;
const mainPack__jaune;
const mainPack__rose;
const mainPack__X = 8;
Exported nodes:
type inter__selType = {i : int; b : bool; r : real};
......@@ -6070,7 +6070,7 @@ End of Syntax table dump.
Exported constants:
Exported nodes:
*** oops: an internal error occurred in file syntaxTab.ml, line 112, column 22
*** oops: an internal error occurred in file syntaxTab.ml, line 111, column 22
*** when compiling lustre program should_work/Pascal/t2.lus
----------------------------------------------------------------------
......@@ -6593,10 +6593,10 @@ type decl__coord_tab = {x : real; y : real}^1;
type decl__couleur = enum {decl__bleu, decl__blanc, decl__rouge};
Exported constants:
const decl__e = 8.500000;
const decl__blanc = decl__blanc;
const decl__f = decl__blanc;
const decl__bleu = decl__bleu;
const decl__rouge = decl__rouge;
const decl__blanc;
const decl__f;
const decl__bleu;
const decl__rouge;
const decl__a:int;
const decl__b:int;
const decl__c:int;
......@@ -6683,10 +6683,10 @@ type declaration__coord_tab = {x : real; y : real}^1;
type declaration__couleur = enum {declaration__bleu, declaration__blanc, declaration__rouge};
Exported constants:
const declaration__e = 8.500000;
const declaration__blanc = declaration__blanc;
const declaration__f = declaration__blanc;
const declaration__bleu = declaration__bleu;
const declaration__rouge = declaration__rouge;
const declaration__blanc;
const declaration__f;
const declaration__bleu;
const declaration__rouge;
const declaration__a:int;
const declaration__b:int;
const declaration__c:int;
......
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