This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa mudflap] -fwritable-strings causes a violation


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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]