[Bug tree-optimization/86203] duplicate non-constant call to strlen() not folded

2018-06-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86203 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/86203] duplicate non-constant call to strlen() not folded

2018-06-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86203 --- Comment #5 from Richard Biener --- (In reply to Martin Sebor from comment #4) > You're right, a strict reading of the standard does imply that the pointer > argument to strlen could point to the integer. I keep forgetting about this > unfort

[Bug tree-optimization/86203] duplicate non-constant call to strlen() not folded

2018-06-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86203 --- Comment #4 from Martin Sebor --- You're right, a strict reading of the standard does imply that the pointer argument to strlen could point to the integer. I keep forgetting about this unfortunate loophole. Ironically, the equivalent code us

[Bug tree-optimization/86203] duplicate non-constant call to strlen() not folded

2018-06-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86203 --- Comment #3 from Richard Biener --- It works if you make n0 static btw. (only in late FRE because early TREE_ADDRESSABLE of n0 is not yet cleared)

[Bug tree-optimization/86203] duplicate non-constant call to strlen() not folded

2018-06-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86203 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug tree-optimization/86203] duplicate non-constant call to strlen() not folded

2018-06-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86203 Martin Sebor changed: What|Removed |Added Keywords||missed-optimization See Also|