From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29748 invoked by alias); 21 Dec 2008 12:05:51 -0000 Received: (qmail 29283 invoked by uid 48); 21 Dec 2008 12:03:38 -0000 Date: Sun, 21 Dec 2008 12:05:00 -0000 Message-ID: <20081221120338.29282.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/38592] eliminate some string comparisons In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tkoenig at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg01930.txt.bz2 ------- 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' == a end program main $ gfortran -fdump-tree-original foo-2.f90 $ grep compare foo-2.f90.003t.original $ -- tkoenig at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Priority|P3 |P5 Summary|eliminate constant string |eliminate some string |comparisons |comparisons http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38592