This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52196] Add -Wrealloc-lhs
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Apr 2012 06:26:01 +0000
- Subject: [Bug fortran/52196] Add -Wrealloc-lhs
- Auto-submitted: auto-generated
- References: <bug-52196-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52196
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-25 06:26:01 UTC ---
Author: burnus
Date: Wed Apr 25 06:25:48 2012
New Revision: 186806
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186806
Log:
2012-04-25 Tobias Burnus <burnus@net-b.de>
PR fortran/52196
* lang.opt (Wrealloc-lhs, Wrealloc-lhs-all): New flags.
* gfortran.h (gfc_option_t): Add them.
* options.c (gfc_init_options, gfc_post_options,
gfc_handle_option): Handle them.
* invoke.texi: Document them.
* trans-expr.c (realloc_lhs_warning): New function.
(gfc_trans_arrayfunc_assign,
alloc_scalar_allocatable_for_assignment,
gfc_trans_assignment_1): Use it.
2012-04-25 Tobias Burnus <burnus@net-b.de>
PR fortran/52196
* gfortran.dg/realloc_on_assign_14.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/realloc_on_assign_14.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/invoke.texi
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/options.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog