[tree-ssa mudflap] -fwritable-strings causes a violation
Frank Ch. Eigler
fche@redhat.com
Fri May 30 16:58:00 GMT 2003
Hi -
On Sat, May 17, 2003 at 03:52:29PM +1000, Eyal Lebedinsky wrote:
> registering the (unused) string leads to this:
> mf: register ptr=0804963c size=4 type=4 name='/home/eyal/zz.c:1 string'
> [...]
This is a symptom of a bug in gcc which is unrelated to mudflap,
and probably unrelated to tree-ssa. Even with "-fdisable-simple",
the "-fwritable-strings" option miscompiles this simple program:
char *string[] = {"bla bla bla"};
into
.file "foo.c"
.data
.LC0:
.string "bla bla bla"
.globl string
.align 4
.type string, @object
.size string, 4
string:
.LC1:
.string "bla bla bla"
.long .LC1
.ident "GCC: (GNU) 3.5-tree-ssa 20030529 (merged 20030511)"
Note how the "string" array is not initialized as ".LC0", like it
would be if "-fwritable-strings" is absent.
- FChE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030530/fbd21848/attachment.sig>
More information about the Gcc
mailing list