[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED CC||mpolacek at gcc dot gnu.org Resolution|--- |FIXED --- Comment #9 from Marek Polacek mpolacek at gcc dot gnu.org --- This one should be fixed.
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 --- Comment #8 from Steve Ellcey sje at gcc dot gnu.org 2012-09-26 20:33:32 UTC --- Author: sje Date: Wed Sep 26 20:33:28 2012 New Revision: 191772 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=191772 Log: 2012-09-26 Steve Ellcey sell...@mips.com PR c/37303 * gcc.dg/pr37303.c: Check for rdata or rodata. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr37303.c
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 --- Comment #7 from Andrew Pinski pinskia at gcc dot gnu.org 2012-05-06 01:10:39 UTC --- This test fails on MIPS because the section is rdata rather than rodata.
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 Ian Lance Taylor ian at airs dot com changed: What|Removed |Added CC||ian at airs dot com Known to fail|| --- Comment #4 from Ian Lance Taylor ian at airs dot com 2012-05-01 20:06:35 UTC --- Potential patch: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00042.html
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 --- Comment #5 from ian at gcc dot gnu.org ian at gcc dot gnu.org 2012-05-01 21:25:20 UTC --- Author: ian Date: Tue May 1 21:25:15 2012 New Revision: 187027 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=187027 Log: 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. Added: trunk/gcc/testsuite/gcc.dg/pr37303.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-decl.c trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 Ian Lance Taylor ian at airs dot com changed: What|Removed |Added Known to work||4.8.0 --- Comment #6 from Ian Lance Taylor ian at airs dot com 2012-05-01 21:26:28 UTC --- Fixed on mainline for the future 4.8.0 release.
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303 Dag Ågren paracelsus at gmail dot com changed: What|Removed |Added CC||paracelsus at gmail dot com --- Comment #3 from Dag Ågren paracelsus at gmail dot com 2012-02-28 00:48:24 UTC --- This is still present in 4.6, and it is more severe than a missed optimization. It breaks storing data in ROM on microcontrollers, which is very critical when you have very little RAM.
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
--- Comment #2 from pinskia at gcc dot gnu dot org 2008-10-01 17:25 --- From C99 6.5.2.5/8: String literals, and compound literals with const-qualified types, need not designate distinct objects -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303
[Bug c/37303] const compound initializers in structs are written to .data instead of .rodata
--- Comment #1 from pinskia at gcc dot gnu dot org 2008-09-02 20:57 --- Confirmed, not a regression as far as I can tell. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||missed-optimization Known to fail||3.3.3 4.0.1 4.1.1 4.4.0 Last reconfirmed|-00-00 00:00:00 |2008-09-02 20:57:27 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303