re PR c/37303 (const compound initializers in structs are written to .data instead of .rodata)
gcc/: PR c/37303 * c-decl.c (build_compound_literal): Make the decl readonly if it an array of a readonly type. * gimplify.c (gimplify_compound_literal_expr): Add fallback parameter. Change all callers. If the decl is not addressable and is not an l-value, make it readonly. gcc/testsuite: PR c/37303 * gcc.dg/pr37303.c: New test. From-SVN: r187027
Showing
gcc/testsuite/gcc.dg/pr37303.c
0 → 100644
Please
register
or
sign in
to comment