This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] PATCH expr.c(expand_exp) fix bogus return value for CATCH_EXPR.
- From: Graham Stott <graham dot stott at btinternet dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 21 Sep 2003 17:01:19 +0100
- Subject: [tree-ssa] PATCH expr.c(expand_exp) fix bogus return value for CATCH_EXPR.
All,
The attached patch fixes the "op0 might be used uninitialized" warning in expr.c(expand_expr).
The warning is correct we're returning an unitialised op0 in the CATCH_EXPR case.
The correct return value here looks to be "const0_rtx".
Bootstrapped regression tested all languages no regressions x86=pc-linux-gnu
Note if the patch is approved I unable to commit it myself until next weekend.
Cheers
Graham
ChangeLog.tree-ssa
* expr.c(expand_expr)[CATCH_EXPR]: Fix bogus return value.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.467.2.48
diff -c -p -r1.467.2.48 expr.c
*** expr.c 18 Sep 2003 00:19:26 -0000 1.467.2.48
--- expr.c 21 Sep 2003 15:38:28 -0000
*************** expand_expr (tree exp, rtx target, enum
*** 9650,9656 ****
expand_start_catch (CATCH_TYPES (exp));
expand_expr (CATCH_BODY (exp), const0_rtx, VOIDmode, 0);
expand_end_catch ();
! return op0;
case EH_FILTER_EXPR:
/* Should have been handled in expand_eh_handler. */
--- 9650,9656 ----
expand_start_catch (CATCH_TYPES (exp));
expand_expr (CATCH_BODY (exp), const0_rtx, VOIDmode, 0);
expand_end_catch ();
! return const0_rtx;
case EH_FILTER_EXPR:
/* Should have been handled in expand_eh_handler. */