Warnings in simplify.c
FX
fxcoudert@gmail.com
Mon May 19 12:23:00 GMT 2008
> Since gfc_internal_error has ATTRIBUTE_NORETURN and there is no flow
> through gfc_simplify_dble() that leaves result uninitialized i'd
> consider this a bug in the middle-end and as such it should be fixed
> there.
It's more complex than that, because it comes from the conditional
definition depending on e->is_boz. A reduced testcase shows that GCC
copes well with it if it's a simple integer variable instead of a
structure member. It's probably due to the fact that e->is_boz could
be modified in gfc_int2real(), and then result really would be used
uninitialised. But anyway, I've fixed it by initialising it to NULL.
On a related note, Steve's other patch introduced testcases that are failing:
FAIL: gfortran.dg/bind_c_module.f90 -O (test for errors, line 13)
FAIL: gfortran.dg/bind_c_module.f90 -O (test for errors, line 20)
FAIL: gfortran.dg/bind_c_module.f90 -O (test for excess errors)
(I see it and Geoff's automatic regtester also does, see
http://gcc.gnu.org/ml/gcc-testresults/2008-05/msg01682.html) It looks
like there is a mismatch between the error message and the dg-error
pattern:
/home/fxcoudert/devel/trunk6/gcc/testsuite/gfortran.dg/bind_c_module.f90:13.14:
bind(c) :: a ! { dg-error "attribute applied to" }
1
Error: BIND(C) applied to MODULE a at (1)
/home/fxcoudert/devel/trunk6/gcc/testsuite/gfortran.dg/bind_c_module.f90:20.14:
bind(c) :: a ! { dg-error "attribute applied to" }
1^M
Error: BIND(C) applied to MODULE a at (1)
--
FX Coudert
http://www.homepages.ucl.ac.uk/~uccafco/
More information about the Fortran
mailing list