+2009-09-17 Michael Matz <matz@suse.de>
+
+ PR middle-end/41347
+ * tree.c (build_type_attribute_qual_variant): Export.
+ * tree.h (build_type_attribute_qual_variant): Declare.
+ * tree-inline.c (remap_type_1): Use it to build variants with
+ the original qualifiers and attributes.
+
2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* cfglayout.c (fixup_reorder_chain): Accept conditional jumps
+2009-09-17 Michael Matz <matz@suse.de>
+
+ PR middle-end/41347
+ * gfortran.dg/pr41347.f90: New test.
+
2009-09-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.c-torture/compile/20090917-1.c: New testcase.
--- /dev/null
+! { dg-do compile }
+! { dg-options "-O3" }
+module hsl_ma41_m
+
+ implicit none
+
+ contains
+
+ subroutine solve_ma41
+ integer, dimension(20) :: info
+ call prininfo(15, info)
+ end subroutine solve_ma41
+
+ subroutine prininfo (ni, info)
+ integer, intent(in) :: ni
+ integer, intent(in), dimension(:) :: info
+
+ integer i
+
+ call prinfo
+
+ contains
+
+ subroutine prinfo
+ do i = 1, ni
+ write(*,'(i5,1x,i0)') i, info(i)
+ end do
+ end subroutine prinfo
+
+ end subroutine prininfo
+
+end module hsl_ma41_m
new_tree = build_pointer_type_for_mode (remap_type (TREE_TYPE (type), id),
TYPE_MODE (type),
TYPE_REF_CAN_ALIAS_ALL (type));
+ if (TYPE_ATTRIBUTES (type) || TYPE_QUALS (type))
+ new_tree = build_type_attribute_qual_variant (new_tree,
+ TYPE_ATTRIBUTES (type),
+ TYPE_QUALS (type));
insert_decl_map (id, type, new_tree);
return new_tree;
}
new_tree = build_reference_type_for_mode (remap_type (TREE_TYPE (type), id),
TYPE_MODE (type),
TYPE_REF_CAN_ALIAS_ALL (type));
+ if (TYPE_ATTRIBUTES (type) || TYPE_QUALS (type))
+ new_tree = build_type_attribute_qual_variant (new_tree,
+ TYPE_ATTRIBUTES (type),
+ TYPE_QUALS (type));
insert_decl_map (id, type, new_tree);
return new_tree;
}
Record such modified types already made so we don't make duplicates. */
-static tree
+tree
build_type_attribute_qual_variant (tree ttype, tree attribute, int quals)
{
if (! attribute_list_equal (TYPE_ATTRIBUTES (ttype), attribute))
extern tree build_type_attribute_variant (tree, tree);
extern tree build_decl_attribute_variant (tree, tree);
+extern tree build_type_attribute_qual_variant (tree, tree, int);
/* Structure describing an attribute and a function to handle it. */
struct attribute_spec