[patch] Flag-controlled type conversions/promotions

Dominique Dhumieres dominiq@lps.ens.fr
Mon Dec 26 16:15:00 GMT 2011


> I regression tested the patch on i686-*-freebsd.  No problems occurred.
> Can one of the other gfortran reviewers/committers cast a quick glance
> over the patch.  I would like to commit this within next day or two.

I have applied the patch on trunk (incremental update). I did not get any
regression on x86_64-apple-darwin10 with either -m32 or -m64.

With the follwoing patch

--- /opt/gcc/_clean/gcc/testsuite/lib/prune.exp	2011-10-17 12:04:23.000000000 +0200
+++ /opt/gcc/work/gcc/testsuite/lib/prune.exp	2011-12-26 13:59:57.000000000 +0100
@@ -42,6 +42,9 @@ proc prune_gcc_output { text } {
     regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
     regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
 
+    # Ignore warning for gfortran options passed to the C compilers.
+    regsub -all "(^|\n)cc1: warning: command line option .-f\[^\"\]*. is valid for Fortran but not for C\[^\n\]*" $text "" text
+
     # Ignore second line of IRIX 6 linker multiline message.
     regsub -all "(^|\n)\[ \t\]*that might degrade performance on an older version \\(rev. 2.2\\) R4000 processor.\[^\n\]*" $text "" text
 

I get

		=== gfortran Summary for unix/-m32/-finteger-4-integer-8 ===

# of expected passes		37336
# of unexpected failures	896
# of expected failures		39
# of unresolved testcases	1
# of unsupported tests		570

		=== gfortran Summary for unix/-m64/-finteger-4-integer-8 ===

# of expected passes		37728
# of unexpected failures	840
# of expected failures		39
# of unsupported tests		409

related to pr32770.

I did not have the time to go through the details of the failures, but
(1) there are a few ICEs after error as in

FAIL: gfortran.dg/coarray/image_index_1.f90 -fcoarray=lib  -O2  -lcaf_single (internal compiler error)
FAIL: gfortran.dg/coarray/image_index_1.f90 -fcoarray=lib  -O2  -lcaf_single (test for excess errors)
Excess errors:
/opt/gcc/work/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:14:0:0: error: mismatching comparison operand types
integer(kind=4)
integer(kind=8)
one = _gfortran_caf_num_images.66 == 1;
...
/opt/gcc/work/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:14:0:0: error: mismatching comparison operand types
integer(kind=8)
integer(kind=4)
D.2567 = D.2100 <= _gfortran_caf_num_images.66;
/opt/gcc/work/gcc/testsuite/gfortran.dg/coarray/image_index_1.f90:14:0:0: internal compiler error: verify_gimple failed

These ICEs on invalid occur mostly in coarray tests, but I also see

FAIL: gfortran.dg/popcnt_poppar_2.F90  -O0  (internal compiler error)
FAIL: gfortran.dg/popcnt_poppar_2.F90  -O0  (test for excess errors)
Excess errors:
/opt/gcc/work/gcc/testsuite/gfortran.dg/popcnt_poppar_2.F90:30:0:0: error: type mismatch in binary expression
integer(kind=8)
integer(kind=4)
integer(kind=4)
res = D.1935 + D.1938;
/opt/gcc/work/gcc/testsuite/gfortran.dg/popcnt_poppar_2.F90:30:0:0: internal compiler error: verify_gimple failed

I think the errors are exepcted, but gfortran should exit without ICE. I'll fill a pr when the patch
will be committed.

Among other errors, several ones are related to broken generic interfaces for different KIND.
The manual could probably lists some expected breakages such as this one.

The difference between -fdefault-*-8 and -f*-4-*-8 should probably also be documented.

Last point for this batch is that using '-freal-8-real-10 -freal-8-real-16' does not
generate an error, the last option being the one used.

Thanks fro the patch,

Dominique



More information about the Fortran mailing list