This code: character*256 buff(0:10) character*80 strings(10) integer i,m1,m2 i = 1 m1 = 1 m2 = 7 buff(i) = 'tcase0a' strings(i) = buff(i)(m1:m2) write(*,*)buff(i) write(*,*)buff(i)(m1:m2) write(*,*)strings(i) stop end should print "tcase0a" three times, the first time with 248 blanks attached. However, with 'g77 [other options] -fbounds-check' it doesn't. Release: 3.1 Environment: Linux, probably unimportant
State-Changed-From-To: open->analyzed State-Changed-Why: Analysed, test case added to g77.dg directory as 7388.f. Might not be a frontend problem, as it doesn't fail on all targets (specifically, sparc64).
From: Hans-Peter Nilsson <hp@bitrange.com> To: Moene <toon@moene.indiv.nluug.nl>, <allan@rolls-royce.ca>, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <george@geo.titech.ac.jp>, <nobody@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org> Cc: Subject: Re: fortran/7388: Incorrect output with 0 based array of characters. Date: Sat, 28 Sep 2002 13:40:11 -0400 (EDT) For the record, g77.dg/7388.f fails on mmix-knuth-mmixware too.
Responsible-Changed-From-To: unassigned->toon Responsible-Changed-Why: Fortran Maintainer.
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed in 3.2.1 and 3.3. Probably by Nathan Sidwell, fixing PR c++/7209: * fold_const.c (fold_binary_op_with_conditional_arg): Alwasy build compound_expr if we used save_expr.