This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, fortran] PR26822 - Scalarization of non-elemental intrinsic: __logical_4_l4
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: patch <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Thu, 13 Apr 2006 20:50:56 +0200
- Subject: [Patch, fortran] PR26822 - Scalarization of non-elemental intrinsic: __logical_4_l4
:ADDPATCH fortran:
This took a depressingly long time to get to the bottom of -
particularly since the patch changes but one character! Fortunately, it
was a few minutes here and there.
The problem came about because LOGICAL was not marked as elemental in
intrinsic.c(add_functions), which put it in the wrong place in
trans_intrinsic.c and caused the observed problem. The error message
should have made it obvious what was happening.
I do not see any point in a testcase to verify the correction of a typo
and so have not included one. The principle of this kind of intrinsic
is more than adequately tested.
Regtested on FC3/Athlon - will commit under the obvious rule, when doing
other commits.
Paul
2006-04-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/26822
* intrinsic.c (add_functions): Mark LOGICAL as elemental.
Index: gcc/fortran/intrinsic.c
===================================================================
*** gcc/fortran/intrinsic.c (revision 112712)
--- gcc/fortran/intrinsic.c (working copy)
*************** add_functions (void)
*** 1670,1676 ****
make_generic ("log10", GFC_ISYM_LOG10, GFC_STD_F77);
! add_sym_2 ("logical", 0, 1, BT_LOGICAL, dl, GFC_STD_F95,
gfc_check_logical, gfc_simplify_logical, gfc_resolve_logical,
l, BT_LOGICAL, dl, REQUIRED, kind, BT_INTEGER, di, OPTIONAL);
--- 1670,1676 ----
make_generic ("log10", GFC_ISYM_LOG10, GFC_STD_F77);
! add_sym_2 ("logical", 1, 1, BT_LOGICAL, dl, GFC_STD_F95,
gfc_check_logical, gfc_simplify_logical, gfc_resolve_logical,
l, BT_LOGICAL, dl, REQUIRED, kind, BT_INTEGER, di, OPTIONAL);