[Patch, fortran] PR29975 - [meta-bugs] ICEs with CP2K

Paul Thomas paulthomas2@wanadoo.fr
Tue Dec 5 19:14:00 GMT 2006


:ADDPATCH fortran:

This, at the moment anyway, is a triple bug.  A fourth, offshoot, has 
become PR30068.

The first is an easy one.  expr.c (find_array_section) failed if the 
array had a lower bound that was not unity.  This was simply an error in 
the pointer arithmetic and was fixed by substituting 1 in the expression 
for the pointer by the lower bound.  array_initializer_2.f90 was 
extended to fix this.

The second bug was slightly more complicated.  generic interfaces can be 
ambiguous if they do not contain ambiguous specific procedures.  This 
part of the patch is fixed in symbol.c by not raising the error if the 
symbol is generic.  Then the third part concerned the conditions in 
which ambiguous interfaces can cause an error - in essence, they must be 
referenced.  This allows correct use of two modules for other things 
than the ambiguous interfaces that they contain.  Finally, other 
compilers, a warning is omitted for an ambiguous interface, where only 
one is use associated, even if they are not referenced.  All this is 
done in interface.c.  Two new tests have been added and two were 
corrected; one by adding a reference to the ambiguous interfaces and 
another by changing an error to a warning.

Regtested on  Cygwin_NT/amd64.

OK for trunk and, after a delay, 4.2?

Paul
 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061205/4f47a6c0/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: entire.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061205/4f47a6c0/attachment-0001.ksh>


More information about the Fortran mailing list