https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38592
--- Comment #7 from Thomas Koenig ---
We still do the comparison, although with memcmp now.
More interesting question is if we could/should do
forward propagation of values in the front end,
or if this is something that the middle-end should,
in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38592
kargl at gcc dot gnu.org changed:
What|Removed |Added
CC||kargl at gcc dot gnu.org
--- C
--- Comment #5 from burnus at gcc dot gnu dot org 2009-05-08 11:25 ---
> > As a matter of curiosity, do other compilers catch this?
> Intel does not.
Sure? If I look at the assembler of ifort 11.1 with -O3, I only see:
call __intel_new_proc_init #1.9
--- Comment #4 from fxcoudert at gcc dot gnu dot org 2009-05-08 09:30
---
(In reply to comment #3)
> As a matter of curiosity, do other compilers catch this?
Intel does not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38592
--- Comment #3 from pault at gcc dot gnu dot org 2009-02-19 05:44 ---
Thomas, As a matter of curiosity, do other compilers catch this?
Confirmed
Paul
--
pault at gcc dot gnu dot org changed:
What|Removed |Added
---
--- Comment #2 from dfranke at gcc dot gnu dot org 2008-12-28 01:28 ---
This is generally the case, not just for/with strings.
I don't think that anything will ever happen in this regard, at least, not on
the frontend side. If (some) intrinsics, including string comparisons, were
inline
--- Comment #1 from tkoenig at gcc dot gnu dot org 2008-12-21 12:03 ---
To clarify, we could detect that the variable only ever
has the value of 'yes'. We already do the right
thing with constants:
$ cat foo-2.f90
program main
character(len=3), parameter :: a = 'yes'
print *,'yes'