From 3609ee93e39f4896d749640760f82abdcde33fed Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 24 Feb 2020 18:06:23 +0100 Subject: thread local declarations now work --- cfrontend/C2C.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cfrontend/C2C.ml') 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); -- cgit