diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-02-24 18:06:23 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-02-24 18:06:23 +0100 |
commit | 3609ee93e39f4896d749640760f82abdcde33fed (patch) | |
tree | ab2233664ba2dc1587bd58e61c174171c6349fed /cfrontend/C2C.ml | |
parent | f64f6374c4b9db9f1111f272d842a625f0507ae6 (diff) | |
download | compcert-kvx-3609ee93e39f4896d749640760f82abdcde33fed.tar.gz compcert-kvx-3609ee93e39f4896d749640760f82abdcde33fed.zip |
thread local declarations now work
Diffstat (limited to 'cfrontend/C2C.ml')
-rw-r--r-- | cfrontend/C2C.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index d03392b1..441c0a14 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -1347,7 +1347,11 @@ let convertGlobvar loc env (sto, id, ty, optinit) = | Some i -> convertInitializer env ty i in let (section, access) = - Sections.for_variable env id' ty (optinit <> None) in + Sections.for_variable env id' ty (optinit <> None) + (match sto with + | Storage_thread_local | Storage_thread_local_extern + | Storage_thread_local_static -> true + | _ -> false) in if Z.gt sz (Z.of_uint64 0xFFFF_FFFFL) then error "'%s' is too big (%s bytes)" id.name (Z.to_string sz); |