Re: [Bug c/47980] Inefficient code for local const char arrays

2011-03-04 Thread Jan Hubicka
> I believe f could do: > assert (arg != "aoeuaoeuaeouaeouaoeuaoeaoxbxod"); > which would then fail with the proposed optimization. It is unspecified if > two string literals with the same content are distinct objects, but foo must > be > a distinct object (ok, with static const char foo[] = >

[Bug c/47980] Inefficient code for local const char arrays

2011-03-03 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47980 --- Comment #4 from Jakub Jelinek 2011-03-03 21:59:50 UTC --- I believe f could do: assert (arg != "aoeuaoeuaeouaeouaoeuaoeaoxbxod"); which would then fail with the proposed optimization. It is unspecified if two string literals with the same

[Bug c/47980] Inefficient code for local const char arrays

2011-03-03 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47980 Kai Tietz changed: What|Removed |Added Status|RESOLVED|REOPENED Last reconfirmed|

[Bug c/47980] Inefficient code for local const char arrays

2011-03-03 Thread rafael.espindola at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47980 --- Comment #2 from Rafael Avila de Espindola 2011-03-03 21:50:07 UTC --- I agree that the code is correct. The bug is because of a missing optimization, not about wrong behavior. The only use of foo is passing it function expecting a const point

[Bug c/47980] Inefficient code for local const char arrays

2011-03-03 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47980 Kai Tietz changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|