This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran,patch] Fix PR35682, more wrong array bounds calculation
- From: FX <fxcoudert at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 14 May 2008 22:30:25 +0100
- Subject: Re: [fortran,patch] Fix PR35682, more wrong array bounds calculation
- References: <FDB4EFC9-F7CB-4983-A1AC-769544A3B393@gmail.com> <482B1F9D.7070606@net-b.de>
If MAX is only needed for -fbounds-check, how about adding it only
when the bounds are checked?
The correct thing to do is to fix it in all cases: we shouldn't have
negative sizes anywhere, some other parts of the code depend on it.
I'm not sure there currently is a codepath in the front-end that
currently fails because of this particular instance, but the right
thing is to fix it.
OK with or without that change.
Committed as submitted. Thanks for the reviews!
FX
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/