re PR debug/51517 (Wrong debug information for pointers with negative strides.)

PR debug/51517
	* trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span.
	(gfc_trans_deferred_vars): Instead add its runtime initialization
	here.

	* tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test
	!DECL_IGNORED_P instead of !DECL_ARTIFICIAL.

From-SVN: r182362
This commit is contained in:
Jakub Jelinek 2011-12-15 12:05:37 +01:00
parent b3908fcc0d
commit 0c1e1df880
4 changed files with 36 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2011-12-15 Jakub Jelinek <jakub@redhat.com>
PR debug/51517
* tree-ssa-coalesce.c (coalesce_ssa_name): For !optimize, test
!DECL_IGNORED_P instead of !DECL_ARTIFICIAL.
2012-12-15 Richard Guenther <rguenther@suse.de>
Revert

View File

@ -1,3 +1,10 @@
2011-12-15 Jakub Jelinek <jakub@redhat.com>
PR debug/51517
* trans-decl.c (gfc_get_symbol_decl): Don't set DECL_INITAL on span.
(gfc_trans_deferred_vars): Instead add its runtime initialization
here.
2011-12-11 Tobias Burnus <burnus@net-b.de>
PR fortran/50923
@ -15,7 +22,7 @@
PR fortran/46356
PR fortran/46990
PR fortran/49074
* interface.c(symbol_rank): Return the rank of the _data
* interface.c (symbol_rank): Return the rank of the _data
component of class objects.
(compare_parameter): Also compare the derived type of the class
_data component for type mismatch. Similarly, return 1 if the
@ -66,10 +73,10 @@
Also unset codimension.
(gfc_find_derived_vtab): Make 'copy' elemental and set the
intent of the arguments accordingly.:
* trans-array.h : Update prototype for gfc_array_allocate.
* trans-array.h: Update prototype for gfc_array_allocate.
* array.c (gfc_array_dimen_size): Return failure if class expr.
(gfc_array_size): Likewise.
* gfortran.h : New prototypes for gfc_add_class_array_ref,
* gfortran.h: New prototypes for gfc_add_class_array_ref,
gfc_is_class_array_ref and gfc_is_class_scalar_expr.
* trans-stmt.c (trans_associate_var): Exclude class targets
from test. Move the allocation of the _vptr to an earlier time
@ -82,7 +89,7 @@
* expr.c (gfc_get_corank): Fix for BT_CLASS.
(gfc_is_simply_contiguous): Exclude class from test.
* trans.c (gfc_build_array_ref): Include class array refs.
* trans.h : Include prototypes for class API functions that are
* trans.h: Include prototypes for class API functions that are
new in trans-expr. Define GFC_DECL_CLASS(node).
* resolve.c (check_typebound_baseobject ): Remove error for
non-scalar base object.
@ -2428,7 +2435,7 @@
changed to GFC_ENABLE_REVERSE.
* trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
to GFC_INHIBIT_REVERSE.
* gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
* gfortran.h: Enum gfc_reverse is now GFC_ENABLE_REVERSE,
GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
* dependency.c (gfc_dep_resolver): Change names for elements of
gfc_reverse as necessary. Change the logic so that forward
@ -3271,7 +3278,7 @@
2011-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/22572
* gfortran.h (gfc_option_t) : Add
* gfortran.h (gfc_option_t): Add
flag_aggressive_function_elimination.
(gfc_dep_compare_functions): Add prototype.
* lang.opt: Add faggressive-function-elimination.
@ -3409,7 +3416,7 @@
PR fortran/44945
* trans-types.c (gfc_get_derived_type): Remove code that looks
for decls in gsym and add call to gfc_get_module_backend_decl.
* trans.h : Add prototype for gfc_get_module_backend_decl.
* trans.h: Add prototype for gfc_get_module_backend_decl.
* trans-decl.c (gfc_get_module_backend_decl): New function.
(gfc_get_symbol_decl): Call it.
@ -3708,7 +3715,7 @@
is called before reallocation, so that the length is available.
(gfc_trans_asssignment): Remove error about assignment to
deferred length character variables.
* gfortran.texi : Update entry about (re)allocation on
* gfortran.texi: Update entry about (re)allocation on
assignment.
* trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
length character variables.
@ -3889,7 +3896,7 @@
implicit pureness of containing procedure.
* decl.c (match_old_style_init, gfc_match_data): Where decl
would fail in PURE procedure, set implicit_pure to zero.
* gfortran.h : Add implicit_pure to structure symbol_attr and
* gfortran.h: Add implicit_pure to structure symbol_attr and
add prototype for function gfc_implicit_pure.
* expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
Where decl would fail in PURE procedure, reset implicit_pure.
@ -3901,7 +3908,7 @@
* parse.c (decode_omp_directive): The same.
(parse_contained): If not PURE, set implicit pure attribute.
* resolve.c (resolve_formal_arglist, resolve_structure_cons,
resolve_function, resolve_ordinary_assign) : The same.
resolve_function, resolve_ordinary_assign): The same.
(gfc_implicit_pure): New function.
* module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
to ab_attribute enum and use it in this function.

View File

@ -1434,7 +1434,6 @@ gfc_get_symbol_decl (gfc_symbol * sym)
gfc_finish_var_decl (span, sym);
TREE_STATIC (span) = TREE_STATIC (decl);
DECL_ARTIFICIAL (span) = 1;
DECL_INITIAL (span) = build_int_cst (gfc_array_index_type, 0);
GFC_DECL_SPAN (decl) = span;
GFC_TYPE_ARRAY_SPAN (TREE_TYPE (decl)) = span;
@ -3577,6 +3576,17 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block)
if (sym->assoc)
continue;
if (sym->attr.subref_array_pointer
&& GFC_DECL_SPAN (sym->backend_decl)
&& !TREE_STATIC (GFC_DECL_SPAN (sym->backend_decl)))
{
gfc_init_block (&tmpblock);
gfc_add_modify (&tmpblock, GFC_DECL_SPAN (sym->backend_decl),
build_int_cst (gfc_array_index_type, 0));
gfc_add_init_cleanup (block, gfc_finish_block (&tmpblock),
NULL_TREE);
}
if (sym->attr.dimension || sym->attr.codimension)
{
/* Assumed-size Cray pointees need to be treated as AS_EXPLICIT. */

View File

@ -1,5 +1,5 @@
/* Coalesce SSA_NAMES together for the out-of-ssa pass.
Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Andrew MacLeod <amacleod@redhat.com>
@ -1372,7 +1372,7 @@ coalesce_ssa_name (void)
if (a
&& SSA_NAME_VAR (a)
&& !DECL_ARTIFICIAL (SSA_NAME_VAR (a))
&& !DECL_IGNORED_P (SSA_NAME_VAR (a))
&& (!has_zero_uses (a) || !SSA_NAME_IS_DEFAULT_DEF (a)))
{
tree *slot = (tree *) htab_find_slot (ssa_name_hash, a, INSERT);