Bug #343

ACX_FORTRAN_RUN_CHECK_SIZEOF in acx_fc_real_size.m4 does not check size of its argument

Added by Matthew Krupcale almost 5 years ago. Updated 4 months ago.

Start date:
Due date:
% Done:


Estimated time:


The function ACX_FORTRAN_RUN_CHECK_SIZEOF in m4/acx_fc_real_size.m4 does not actually check for the size of the real type passed as its argument, similar to the analogous function _ACX_FORTRAN_CHECK_SIZEOF_INTEGRAL_TYPE_RUN in m4/acx_fc_integer_size.m4 for integer types.

Furthermore, when using this function, the bits division arithmetic,

AS_VAR_SET([acx_fortran_Sizeof],[`expr ]AS_VAR_GET([acx_fortran_Sizeof])[ / $acx_cv_c_char_bits`])]

was returning some shell errors stating that expr was missing an operator, and that / is a directory. This seems to be due to the multiple nests of eval which come with AS_VAR_SET and AS_VAR_GET. It was easier to just do what was intended using the specifically designed method AS_VAR_ARITH, rather than using the more general AS_VAR_SET with expr.

The attached patch fixes these two issues.


scales-ppm-acx_fc_real_size.patch (893 Bytes) scales-ppm-acx_fc_real_size.patch Matthew Krupcale, 09/25/2017 06:29 PM
scales-ppm-1.0.5-acx_fc_real_size.patch (498 Bytes) scales-ppm-1.0.5-acx_fc_real_size.patch Matthew Krupcale, 10/14/2017 05:25 PM

Updated by Matthew Krupcale over 4 years ago

The latest release of 1.0.5 fixes the second issue noted regarding the division arithmetic, but the first issue remains: the real type passed as the first argument to ACX_FORTRAN_RUN_CHECK_SIZEOF is not checked for its size; rather, the specific type real is checked.

The attached patch is updated for the latest release 1.0.5 to fix this issue.


Updated by Thomas Jahns almost 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
The following commits address this issue:
  • commit:d66a744e01a4b simplifies the shell expression so it works effectively without requiring AS_VAR_ARITH (not present in 2.63 which we support for old XC30 systems)
  • commit:47631e994ffb1 fixes the type under test

Updated by Thomas Jahns 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF