aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/C2C.ml
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-02-24 18:06:23 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-02-24 18:06:23 +0100
commit3609ee93e39f4896d749640760f82abdcde33fed (patch)
treeab2233664ba2dc1587bd58e61c174171c6349fed /cfrontend/C2C.ml
parentf64f6374c4b9db9f1111f272d842a625f0507ae6 (diff)
downloadcompcert-kvx-3609ee93e39f4896d749640760f82abdcde33fed.tar.gz
compcert-kvx-3609ee93e39f4896d749640760f82abdcde33fed.zip
thread local declarations now work
Diffstat (limited to 'cfrontend/C2C.ml')
-rw-r--r--cfrontend/C2C.ml6
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);