Skip to content

Commit 6e388c3

Browse files
committed
Cleaner fix to the x86 issue with kind=16 & long double
1 parent ce350d6 commit 6e388c3

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

x86.diff

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
11
diff --git a/gcc-4.9/libgfortran/mk-kinds-h.sh b/gcc-4.9/libgfortran/mk-kinds-h.sh
2-
index 98a95ab..fdbccb0 100755
2+
index 98a95ab..7cbe7ed 100755
33
--- a/gcc-4.9/libgfortran/mk-kinds-h.sh
44
+++ b/gcc-4.9/libgfortran/mk-kinds-h.sh
5-
@@ -51,7 +51,10 @@ echo "use iso_c_binding; print *, c_long_double ; end" > tmq$$.f90
6-
long_double_kind=`$compile -S -fdump-parse-tree tmq$$.f90 | grep TRANSFER \
7-
| sed 's/ *TRANSFER *//'`
8-
rm -f tmq$$.*
9-
-
10-
+echo "use iso_c_binding; print *, c_double ; end" > tmq$$.f90
11-
+double_kind=`$compile -S -fdump-parse-tree tmq$$.f90 | grep TRANSFER \
12-
+ | sed 's/ *TRANSFER *//'`
13-
+rm -f tmq$$.*
14-
15-
for k in $possible_real_kinds; do
16-
echo " real (kind=$k) :: x" > tmp$$.f90
17-
@@ -66,10 +69,12 @@ for k in $possible_real_kinds; do
18-
ctype="__float128"
19-
cplxtype="_Complex float __attribute__((mode(TC)))"
20-
suffix="q"
21-
- else
22-
+ elif [ $long_double_kind -ne $double_kind ]; then
23-
ctype="long double"
24-
cplxtype="complex long double"
25-
suffix="l"
26-
+ else
27-
+ break;
28-
fi ;;
29-
*) echo "$0: Unknown type" >&2 ; exit 1 ;;
30-
esac
5+
@@ -62,7 +62,7 @@ for k in $possible_real_kinds; do
6+
4) ctype="float" ; cplxtype="complex float" ; suffix="f" ;;
7+
8) ctype="double" ; cplxtype="complex double" ; suffix="" ;;
8+
10) ctype="long double" ; cplxtype="complex long double" ; suffix="l" ;;
9+
- 16) if [ $long_double_kind -eq 10 ]; then
10+
+ 16) if [ $long_double_kind -ne 16 ]; then
11+
ctype="__float128"
12+
cplxtype="_Complex float __attribute__((mode(TC)))"
13+
suffix="q"

0 commit comments

Comments
 (0)