We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following C code:
struct list {unsigned head; struct list *tail;}; struct list three[] = { {1, three+1}, {2, three+2}, {3, NULL} };
Clightgen produces:
Definition v_three := {| gvar_info := (tarray (Tstruct _list noattr) 3); gvar_init := (Init_int32 (Int.repr 1) :: Init_addrof _three (Int.repr 8) :: Init_int32 (Int.repr 2) :: Init_addrof _three (Int.repr 16) :: Init_int32 (Int.repr 3) :: Init_int32 (Int.repr 0) :: nil); gvar_readonly := false; gvar_volatile := false |}.
Coq says: The term "Int.repr 8" has type "int" while it is expected to have type "ptrofs".
Clightgen should produce:
Definition v_three := {| gvar_info := (tarray (Tstruct _list noattr) 3); gvar_init := (Init_int32 (Int.repr 1) :: Init_addrof _three (Ptrofs.repr 8) :: Init_int32 (Int.repr 2) :: Init_addrof _three (Ptrofs.repr 16) :: Init_int32 (Int.repr 3) :: Init_int32 (Int.repr 0) :: nil); gvar_readonly := false; gvar_volatile := false |}.
The text was updated successfully, but these errors were encountered:
Thanks for the report. Fixed by @bschommer in commit ce7013f . Will be in release 3.2.
Sorry, something went wrong.
No branches or pull requests
Consider the following C code:
struct list {unsigned head; struct list *tail;};
struct list three[] = { {1, three+1}, {2, three+2}, {3, NULL} };
Clightgen produces:
Definition v_three := {|
gvar_info := (tarray (Tstruct _list noattr) 3);
gvar_init := (Init_int32 (Int.repr 1) :: Init_addrof _three (Int.repr 8) ::
Init_int32 (Int.repr 2) ::
Init_addrof _three (Int.repr 16) ::
Init_int32 (Int.repr 3) :: Init_int32 (Int.repr 0) :: nil);
gvar_readonly := false;
gvar_volatile := false
|}.
Coq says: The term "Int.repr 8" has type "int" while it is expected to have type "ptrofs".
Clightgen should produce:
Definition v_three := {|
gvar_info := (tarray (Tstruct _list noattr) 3);
gvar_init := (Init_int32 (Int.repr 1) :: Init_addrof _three (Ptrofs.repr 8) ::
Init_int32 (Int.repr 2) ::
Init_addrof _three (Ptrofs.repr 16) ::
Init_int32 (Int.repr 3) :: Init_int32 (Int.repr 0) :: nil);
gvar_readonly := false;
gvar_volatile := false
|}.
The text was updated successfully, but these errors were encountered: