aboutsummaryrefslogtreecommitdiff
path: root/x86_64-gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'x86_64-gen.c')
-rw-r--r--x86_64-gen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c
index 692b420..bf983d4 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -369,6 +369,8 @@ void load(int r, SValue *sv)
ft = sv->type.t & ~VT_DEFSIGN;
fc = sv->c.i;
+ ft &= ~(VT_VOLATILE | VT_CONSTANT);
+
#ifndef TCC_TARGET_PE
/* we use indirect access via got */
if ((fr & VT_VALMASK) == VT_CONST && (fr & VT_SYM) &&
@@ -532,6 +534,7 @@ void store(int r, SValue *v)
ft = v->type.t;
fc = v->c.i;
fr = v->r & VT_VALMASK;
+ ft &= ~(VT_VOLATILE | VT_CONSTANT);
bt = ft & VT_BTYPE;
#ifndef TCC_TARGET_PE