not placed in the RODATA but in the DATA segment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4044
b7a2c559-68d2-44c3-8de9-
860c34a00d81
}
}
- /* Switch to the data or rodata segment */
- if (IsQualConst (Decl.Type)) {
- g_userodata ();
+ /* Switch to the data or rodata segment. For arrays, check
+ * the element qualifiers, since not the array but its
+ * elements are const.
+ */
+ if (IsQualConst (Decl.Type) ||
+ (IsTypeArray (Decl.Type) &&
+ IsQualConst (GetElementType (Decl.Type)))) {
+ g_userodata ();
} else {
g_usedata ();
}