Skip to content
New issue

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

Fatal error: exception Env.Error "Unbound struct 'A'" #129

Closed
zhendongsu opened this issue Aug 22, 2016 · 1 comment
Closed

Fatal error: exception Env.Error "Unbound struct 'A'" #129

zhendongsu opened this issue Aug 22, 2016 · 1 comment

Comments

@zhendongsu
Copy link

$ ccomp -version
The CompCert C verified compiler, version 2.7.1 (commit c64c4ab)
$
$ ccomp small.c
Fatal error: exception Env.Error "Unbound struct 'A'"
Raised at file "cparser/Env.ml", line 173, characters 9-48
Called from file "cparser/Cutil.ml", line 147, characters 15-36
Called from file "cparser/Elab.ml", line 1728, characters 25-57
Called from file "cparser/Elab.ml", line 2261, characters 19-55
Called from file "cparser/Elab.ml", line 2437, characters 19-38
Called from file "cparser/Elab.ml", line 2421, characters 13-54
Called from file "cparser/Elab.ml", line 2450, characters 5-26
Called from file "cparser/Elab.ml", line 2137, characters 14-53
Called from file "cparser/Elab.ml", line 2182, characters 17-56
Called from file "cparser/Elab.ml", line 2203, characters 26-54
Called from file "cparser/Elab.ml", line 2204, characters 26-56
Called from file "cparser/Elab.ml", line 2460, characters 9-63
Called from file "cparser/Parse.ml", line 76, characters 15-59
Called from file "driver/Frontend.ml", line 58, characters 10-59
Called from file "driver/Driver.ml", line 72, characters 12-41
Called from file "driver/Driveraux.ml", line 140, characters 34-40
Called from file "driver/Driver.ml", line 548, characters 22-70
$
$ cat small.c
struct A { int x; } a, *b = &a;

void foo ()
{
*((struct A { int x; } *) b) = a;
}
$

@bschommer
Copy link
Member

Fixed by commit e829671.

bschommer added a commit that referenced this issue Aug 20, 2018
Since the size of integer registers is not identical to the size of pointers
for the ppc64 and e5500 model the check for register pairs in
ExtendedAsm does not work correctly.

In order to avoid this a new field sizeof_intreg is introduced in the
Machine configuration which describes the size of integer registers.
New configurations for the ppc64 and e5500 model are added
and used.

Bug 24273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants