This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Minor cleanup to trans-intrinsic.c
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>,patch <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 20 Dec 2004 20:02:27 +0100
- Subject: Re: [gfortran] Minor cleanup to trans-intrinsic.c
- References: <41C71EBE.7010908@physik.uni-muenchen.de>
Tobias Schlüter wrote:
> 2004-12-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
>
> * trans-intrinsic.c (build_fix_expr): Change 'op' argument
> to correct enum type.
> (gfc_conv_intrinsic_aint): Likewise. Also correct comment in
> front of function. Add default case to switch.
Sigh.
This hunk leads to testsuite failures:
> @@ -350,6 +353,10 @@ gfc_conv_intrinsic_aint (gfc_se * se, gf
> n = BUILT_IN_FLOOR;
> break;
> }
> + break;
> +
> + default:
> + gcc_unreachable ();
> }
>
> /* Evaluate the argument. */
Because the switch deals with FIX_ROUND_EXPR and FIX_FLOOR_EXPR, but the
function is called with FIX_ROUND_EXPR and FIX_TRUNC_EXPR, which I had
originally misread.
Would this patch be ok if I added
case FIX_TRUNC_EXPR:
break;
to the switch?
Sorry,
- Tobi