gcc-4.8.0-0.9

This commit is contained in:
Jakub Jelinek 2013-02-06 21:35:10 +01:00
parent 99eb194caf
commit af08a8b294
7 changed files with 678 additions and 4 deletions

1
.gitignore vendored
View File

@ -57,3 +57,4 @@
/gcc-4.8.0-20130124.tar.bz2 /gcc-4.8.0-20130124.tar.bz2
/gcc-4.8.0-20130129.tar.bz2 /gcc-4.8.0-20130129.tar.bz2
/gcc-4.8.0-20130131.tar.bz2 /gcc-4.8.0-20130131.tar.bz2
/gcc-4.8.0-20130206.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20130131 %global DATE 20130206
%global SVNREV 195626 %global SVNREV 195813
%global gcc_version 4.8.0 %global gcc_version 4.8.0
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line. # %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 0.8 %global gcc_release 0.9
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
%global multilib_64_archs sparc64 ppc64 s390x x86_64 %global multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@ -194,6 +194,10 @@ Patch10: gcc48-pr38757.patch
Patch11: gcc48-libstdc++-docs.patch Patch11: gcc48-libstdc++-docs.patch
Patch12: gcc48-no-add-needed.patch Patch12: gcc48-no-add-needed.patch
Patch13: gcc48-pr55608.patch Patch13: gcc48-pr55608.patch
Patch14: gcc48-pr52448.patch
Patch15: gcc48-pr55978.patch
Patch16: gcc48-pr56154.patch
Patch17: gcc48-pr56228.patch
Patch1000: fastjar-0.97-segfault.patch Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch Patch1001: fastjar-0.97-len1.patch
@ -746,6 +750,10 @@ package or when debugging this package.
%endif %endif
%patch12 -p0 -b .no-add-needed~ %patch12 -p0 -b .no-add-needed~
%patch13 -p0 -b .pr55608~ %patch13 -p0 -b .pr55608~
%patch14 -p0 -b .pr52448~
%patch15 -p0 -b .pr55978~
%patch16 -p0 -b .pr56154~
%patch17 -p0 -b .pr56228~
%if 0%{?_enable_debug_packages} %if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF cat > split-debuginfo.sh <<\EOF
@ -809,6 +817,9 @@ tar xzf %{SOURCE4}
tar xjf %{SOURCE10} tar xjf %{SOURCE10}
%endif %endif
# Hack to work around PR56178
echo 'urealp.o : ALL_ADAFLAGS += -fno-profile-use' >> gcc/ada/gcc-interface/Makefile.in
sed -i -e 's/4\.8\.0/4.8.0/' gcc/BASE-VER sed -i -e 's/4\.8\.0/4.8.0/' gcc/BASE-VER
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@ -2969,6 +2980,24 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog %changelog
* Wed Feb 6 2013 Jakub Jelinek <jakub@redhat.com> 4.8.0-0.9
- updated from trunk
- PRs c++/54122, c++/56177, c++/56208, debug/54793, fortran/47517,
fortran/50627, fortran/54195, fortran/56008, fortran/56054,
libstdc++/56202, lto/56168, middle-end/56113, middle-end/56167,
middle-end/56217, rtl-optimization/56131, sanitizer/55617,
target/52123, target/54601, target/55146, target/56186,
tree-optimization/53185, tree-optimization/53342,
tree-optimization/54386, tree-optimization/55789,
tree-optimization/56188
- fix up stdarg pass (PR tree-optimization/56205, #906367)
- remove unused thread_local bitfield (#907882)
- fix cselim pass on calls that might free memory (PR tree-optimization/52448)
- fix libgfortran internal_pack (PR fortran/55978)
- fix up .debug_loc for first function in CU, if it contains empty ranges
at the beginning of the function (PR debug/56154, #904252)
- fix ppc64 indirect calls (PR target/56228, #908388)
* Thu Jan 31 2013 Jakub Jelinek <jakub@redhat.com> 4.8.0-0.8 * Thu Jan 31 2013 Jakub Jelinek <jakub@redhat.com> 4.8.0-0.8
- updated from trunk - updated from trunk
- PRs c++/56162, debug/54410, debug/54508, debug/55059, fortran/54107, - PRs c++/56162, debug/54410, debug/54508, debug/55059, fortran/54107,

191
gcc48-pr52448.patch Normal file
View File

@ -0,0 +1,191 @@
2013-02-06 Michael Matz <matz@suse.de>
PR tree-optimization/52448
* tree-ssa-phiopt.c (struct name_to_bb): Add phase member.
(nt_call_phase): New static.
(add_or_mark_expr): Only mark accesses with newer phase than any
call seen.
(nonfreeing_call_p): New.
(nt_init_block): Update nt_call_phase, mark blocks as visited.
(nt_fini_block): Keep blocks marked as visited.
(get_non_trapping): Initialize nt_call_phase, and reset aux pointer.
* gcc.dg/pr52448.c: New test.
--- gcc/tree-ssa-phiopt.c (revision 195753)
+++ gcc/tree-ssa-phiopt.c (working copy)
@@ -1233,6 +1233,7 @@ abs_replacement (basic_block cond_bb, ba
struct name_to_bb
{
unsigned int ssa_name_ver;
+ unsigned int phase;
bool store;
HOST_WIDE_INT offset, size;
basic_block bb;
@@ -1241,6 +1242,10 @@ struct name_to_bb
/* The hash table for remembering what we've seen. */
static htab_t seen_ssa_names;
+/* Used for quick clearing of the hash-table when we see calls.
+ Hash entries with phase < nt_call_phase are invalid. */
+static unsigned int nt_call_phase;
+
/* The set of MEM_REFs which can't trap. */
static struct pointer_set_t *nontrap_set;
@@ -1291,6 +1296,7 @@ add_or_mark_expr (basic_block bb, tree e
/* Try to find the last seen MEM_REF through the same
SSA_NAME, which can trap. */
map.ssa_name_ver = SSA_NAME_VERSION (name);
+ map.phase = 0;
map.bb = 0;
map.store = store;
map.offset = tree_low_cst (TREE_OPERAND (exp, 1), 0);
@@ -1298,13 +1304,13 @@ add_or_mark_expr (basic_block bb, tree e
slot = htab_find_slot (seen_ssa_names, &map, INSERT);
n2bb = (struct name_to_bb *) *slot;
- if (n2bb)
+ if (n2bb && n2bb->phase >= nt_call_phase)
found_bb = n2bb->bb;
/* If we've found a trapping MEM_REF, _and_ it dominates EXP
(it's in a basic block on the path from us to the dominator root)
then we can't trap. */
- if (found_bb && found_bb->aux == (void *)1)
+ if (found_bb && (((size_t)found_bb->aux) & 1) == 1)
{
pointer_set_insert (nontrap, exp);
}
@@ -1313,12 +1319,14 @@ add_or_mark_expr (basic_block bb, tree e
/* EXP might trap, so insert it into the hash table. */
if (n2bb)
{
+ n2bb->phase = nt_call_phase;
n2bb->bb = bb;
}
else
{
n2bb = XNEW (struct name_to_bb);
n2bb->ssa_name_ver = SSA_NAME_VERSION (name);
+ n2bb->phase = nt_call_phase;
n2bb->bb = bb;
n2bb->store = store;
n2bb->offset = map.offset;
@@ -1329,20 +1337,55 @@ add_or_mark_expr (basic_block bb, tree e
}
}
+/* Return true when CALL is a call stmt that definitely doesn't
+ free any memory or makes it unavailable otherwise. */
+static bool
+nonfreeing_call_p (gimple call)
+{
+ if (gimple_call_builtin_p (call, BUILT_IN_NORMAL)
+ && gimple_call_flags (call) & ECF_LEAF)
+ switch (DECL_FUNCTION_CODE (gimple_call_fndecl (call)))
+ {
+ /* Just in case these become ECF_LEAF in the future. */
+ case BUILT_IN_FREE:
+ case BUILT_IN_TM_FREE:
+ case BUILT_IN_REALLOC:
+ case BUILT_IN_STACK_RESTORE:
+ return false;
+ default:
+ return true;
+ }
+
+ return false;
+}
+
/* Called by walk_dominator_tree, when entering the block BB. */
static void
nt_init_block (struct dom_walk_data *data ATTRIBUTE_UNUSED, basic_block bb)
{
+ edge e;
+ edge_iterator ei;
gimple_stmt_iterator gsi;
- /* Mark this BB as being on the path to dominator root. */
- bb->aux = (void*)1;
+
+ /* If we haven't seen all our predecessors, clear the hash-table. */
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ if ((((size_t)e->src->aux) & 2) == 0)
+ {
+ nt_call_phase++;
+ break;
+ }
+
+ /* Mark this BB as being on the path to dominator root and as visited. */
+ bb->aux = (void*)(1 | 2);
/* And walk the statements in order. */
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple stmt = gsi_stmt (gsi);
- if (gimple_assign_single_p (stmt) && !gimple_has_volatile_ops (stmt))
+ if (is_gimple_call (stmt) && !nonfreeing_call_p (stmt))
+ nt_call_phase++;
+ else if (gimple_assign_single_p (stmt) && !gimple_has_volatile_ops (stmt))
{
add_or_mark_expr (bb, gimple_assign_lhs (stmt), nontrap_set, true);
add_or_mark_expr (bb, gimple_assign_rhs1 (stmt), nontrap_set, false);
@@ -1355,7 +1398,7 @@ static void
nt_fini_block (struct dom_walk_data *data ATTRIBUTE_UNUSED, basic_block bb)
{
/* This BB isn't on the path to dominator root anymore. */
- bb->aux = NULL;
+ bb->aux = (void*)2;
}
/* This is the entry point of gathering non trapping memory accesses.
@@ -1368,6 +1409,7 @@ get_non_trapping (void)
struct pointer_set_t *nontrap;
struct dom_walk_data walk_data;
+ nt_call_phase = 0;
nontrap = pointer_set_create ();
seen_ssa_names = htab_create (128, name_to_bb_hash, name_to_bb_eq,
free);
@@ -1389,6 +1431,7 @@ get_non_trapping (void)
fini_walk_dominator_tree (&walk_data);
htab_delete (seen_ssa_names);
+ clear_aux_for_blocks ();
return nontrap;
}
--- gcc/testsuite/gcc.dg/pr52448.c (revision 0)
+++ gcc/testsuite/gcc.dg/pr52448.c (working copy)
@@ -0,0 +1,30 @@
+/* PR tree-optimization/52448 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
+
+extern void perhaps_free_something (void);
+
+void f1 (int *p, int a, int b, int cond, int cond2)
+{
+ *p = a;
+ if (cond)
+ perhaps_free_something ();
+ if (cond2)
+ *p = b;
+}
+
+void f2 (int *p, int a, int b, int *cond, int *cond2)
+{
+ int i;
+ *p = a;
+ for (i = 0; cond[i]; i++)
+ {
+ if (cond2[i])
+ *p = b;
+ perhaps_free_something ();
+ }
+}
+
+/* None of the above conditional stores might be made unconditional. */
+/* { dg-final { scan-tree-dump-not "cstore" "cselim" } } */
+/* { dg-final { cleanup-tree-dump "cselim" } } */

49
gcc48-pr55978.patch Normal file
View File

@ -0,0 +1,49 @@
2013-02-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/55978
* runtime/in_pack_generic.c (internal_pack): Return if base_addr is
NULL.
* gfortran.dg/class_optional_2.f90: Uncomment some cases which work now.
--- libgfortran/runtime/in_pack_generic.c (revision 195800)
+++ libgfortran/runtime/in_pack_generic.c (working copy)
@@ -48,6 +48,9 @@ internal_pack (gfc_array_char * source)
index_type size;
index_type type_size;
+ if (source->base_addr == NULL)
+ return NULL;
+
type_size = GFC_DTYPE_TYPE_SIZE(source);
size = GFC_DESCRIPTOR_SIZE (source);
switch (type_size)
--- gcc/testsuite/gfortran.dg/class_optional_2.f90 (revision 195800)
+++ gcc/testsuite/gfortran.dg/class_optional_2.f90 (working copy)
@@ -3,7 +3,7 @@
!
! PR fortran/50981
! PR fortran/54618
-!
+! PR fortran/55978
implicit none
type t
@@ -547,7 +547,7 @@ contains
! call s2elem(z5) ! FIXME: Segfault
! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
-! call s2elem_t(z) ! FIXME: Conditional jump or move depends on uninitialised value
+ call s2elem_t(z)
! call s2elem_t(z2) ! FIXME: Segfault
! call s2elem_t(z3) ! FIXME: Segfault
! call s2elem_t(z4) ! FIXME: Segfault
@@ -590,7 +590,7 @@ contains
! call s2elem(z5) ! FIXME: Segfault
! call s2elem_t2(x) ! FIXME: Conditional jump or move depends on uninitialised value
! call s2elem_t2(y) ! FIXME: Conditional jump or move depends on uninitialised value
-! call s2elem_t2(z) ! FIXME: Conditional jump or move depends on uninitialised value
+ call s2elem_t2(z)
! call s2elem_t2(z2) ! FIXME: Segfault
! call s2elem_t2(z3) ! FIXME: Segfault
! call s2elem_t2(z4) ! FIXME: Segfault

318
gcc48-pr56154.patch Normal file
View File

@ -0,0 +1,318 @@
2013-01-30 Jakub Jelinek <jakub@redhat.com>
PR debug/56154
* dwarf2out.c (dwarf2_debug_hooks): Set end_function hook to
dwarf2out_end_function.
(in_first_function_p, maybe_at_text_label_p,
first_loclabel_num_not_at_text_label): New variables.
(dwarf2out_var_location): In the first function find out
lowest loclabel_num N where .LVLN is known not to be equal
to .Ltext0.
(find_empty_loc_ranges_at_text_label, dwarf2out_end_function): New
functions.
* gcc.dg/guality/pr56154-1.c: New test.
* gcc.dg/guality/pr56154-2.c: New test.
* gcc.dg/guality/pr56154-3.c: New test.
* gcc.dg/guality/pr56154-4.c: New test.
* gcc.dg/guality/pr56154-aux.c: New file.
--- gcc/dwarf2out.c.jj 2013-01-11 09:02:48.000000000 +0100
+++ gcc/dwarf2out.c 2013-01-30 16:18:58.362552894 +0100
@@ -2351,6 +2351,7 @@ static void dwarf2out_imported_module_or
static void dwarf2out_abstract_function (tree);
static void dwarf2out_var_location (rtx);
static void dwarf2out_begin_function (tree);
+static void dwarf2out_end_function (unsigned int);
static void dwarf2out_set_name (tree, tree);
/* The debug hooks structure. */
@@ -2378,7 +2379,7 @@ const struct gcc_debug_hooks dwarf2_debu
#endif
dwarf2out_end_epilogue,
dwarf2out_begin_function,
- debug_nothing_int, /* end_function */
+ dwarf2out_end_function, /* end_function */
dwarf2out_function_decl, /* function_decl */
dwarf2out_global_decl,
dwarf2out_type_decl, /* type_decl */
@@ -20627,6 +20628,14 @@ dwarf2out_set_name (tree decl, tree name
add_name_attribute (die, dname);
}
+/* True if before or during processing of the first function being emitted. */
+static bool in_first_function_p = true;
+/* True if loc_note during dwarf2out_var_location call might still be
+ before first real instruction at address equal to .Ltext0. */
+static bool maybe_at_text_label_p = true;
+/* One above highest N where .LVLN label might be equal to .Ltext0 label. */
+static unsigned int first_loclabel_num_not_at_text_label;
+
/* Called by the final INSN scan whenever we see a var location. We
use it to drop labels in the right places, and throw the location in
our lookup table. */
@@ -20734,6 +20743,45 @@ dwarf2out_var_location (rtx loc_note)
ASM_OUTPUT_DEBUG_LABEL (asm_out_file, "LVL", loclabel_num);
loclabel_num++;
last_label = ggc_strdup (loclabel);
+ /* See if loclabel might be equal to .Ltext0. If yes,
+ bump first_loclabel_num_not_at_text_label. */
+ if (!have_multiple_function_sections
+ && in_first_function_p
+ && maybe_at_text_label_p)
+ {
+ static rtx last_start;
+ rtx insn;
+ for (insn = loc_note; insn; insn = previous_insn (insn))
+ if (insn == last_start)
+ break;
+ else if (!NONDEBUG_INSN_P (insn))
+ continue;
+ else
+ {
+ rtx body = PATTERN (insn);
+ if (GET_CODE (body) == USE || GET_CODE (body) == CLOBBER)
+ continue;
+ /* Inline asm could occupy zero bytes. */
+ else if (GET_CODE (body) == ASM_INPUT
+ || asm_noperands (body) >= 0)
+ continue;
+#ifdef HAVE_attr_length
+ else if (get_attr_min_length (insn) == 0)
+ continue;
+#endif
+ else
+ {
+ /* Assume insn has non-zero length. */
+ maybe_at_text_label_p = false;
+ break;
+ }
+ }
+ if (maybe_at_text_label_p)
+ {
+ last_start = loc_note;
+ first_loclabel_num_not_at_text_label = loclabel_num;
+ }
+ }
}
if (!var_loc_p)
@@ -20903,6 +20951,59 @@ dwarf2out_begin_function (tree fun)
set_cur_line_info_table (sec);
}
+/* Helper function of dwarf2out_end_function, called only after emitting
+ the very first function into assembly. Check if some .debug_loc range
+ might end with a .LVL* label that could be equal to .Ltext0.
+ In that case we must force using absolute addresses in .debug_loc ranges,
+ because this range could be .LVLN-.Ltext0 .. .LVLM-.Ltext0 for
+ .LVLN == .LVLM == .Ltext0, thus 0 .. 0, which is a .debug_loc
+ list terminator.
+ Set have_multiple_function_sections to true in that case and
+ terminate htab traversal. */
+
+static int
+find_empty_loc_ranges_at_text_label (void **slot, void *)
+{
+ var_loc_list *entry;
+ struct var_loc_node *node;
+
+ entry = (var_loc_list *) *slot;
+ node = entry->first;
+ if (node && node->next && node->next->label)
+ {
+ unsigned int i;
+ const char *label = node->next->label;
+ char loclabel[MAX_ARTIFICIAL_LABEL_BYTES];
+
+ for (i = 0; i < first_loclabel_num_not_at_text_label; i++)
+ {
+ ASM_GENERATE_INTERNAL_LABEL (loclabel, "LVL", i);
+ if (strcmp (label, loclabel) == 0)
+ {
+ have_multiple_function_sections = true;
+ return 0;
+ }
+ }
+ }
+ return 1;
+}
+
+/* Hook called after emitting a function into assembly.
+ This does something only for the very first function emitted. */
+
+static void
+dwarf2out_end_function (unsigned int)
+{
+ if (in_first_function_p
+ && !have_multiple_function_sections
+ && first_loclabel_num_not_at_text_label
+ && decl_loc_table)
+ htab_traverse (decl_loc_table, find_empty_loc_ranges_at_text_label,
+ NULL);
+ in_first_function_p = false;
+ maybe_at_text_label_p = false;
+}
+
/* Add OPCODE+VAL as an entry at the end of the opcode array in TABLE. */
static void
--- gcc/testsuite/gcc.dg/guality/pr56154-1.c.jj 2013-01-30 17:14:20.850820429 +0100
+++ gcc/testsuite/gcc.dg/guality/pr56154-1.c 2013-01-30 17:47:25.242537776 +0100
@@ -0,0 +1,29 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+union U { int a, b; };
+volatile int z;
+
+__attribute__((noinline, noclone)) int
+foo (int fd, union U x)
+{
+ int result = x.a != 0;
+ if (fd != 0)
+ result = x.a == 0;
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-1.c:17 "x.a" "4" } } */
+ z = x.a;
+ x.a = 6;
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-1.c:20 "x.a" "6" } } */
+ return result;
+}
+
+void
+test_main (void)
+{
+ union U u = { .a = 4 };
+ foo (0, u);
+}
--- gcc/testsuite/gcc.dg/guality/pr56154-2.c.jj 2013-01-30 17:58:28.229799607 +0100
+++ gcc/testsuite/gcc.dg/guality/pr56154-2.c 2013-01-30 18:06:38.306982101 +0100
@@ -0,0 +1,39 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm (NOP : : : "memory");
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-2.c:30 "x" "28" } } */
+ return x;
+}
+
+void
+test_main (void)
+{
+ if (foo (20) != 28)
+ abort ();
+}
--- gcc/testsuite/gcc.dg/guality/pr56154-3.c.jj 2013-01-30 18:04:47.531604188 +0100
+++ gcc/testsuite/gcc.dg/guality/pr56154-3.c 2013-01-30 18:06:25.031055514 +0100
@@ -0,0 +1,31 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ asm (NOP : : : "memory");
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-3.c:22 "x" "28" } } */
+ return x;
+}
+
+void
+test_main (void)
+{
+ if (foo (20) != 28)
+ abort ();
+}
--- gcc/testsuite/gcc.dg/guality/pr56154-4.c.jj 2013-01-30 18:05:45.959280837 +0100
+++ gcc/testsuite/gcc.dg/guality/pr56154-4.c 2013-01-30 18:07:50.457602221 +0100
@@ -0,0 +1,34 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+extern void abort (void);
+
+volatile int z;
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ z = 6;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ asm (NOP : : : "memory");
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-4.c:25 "x" "28" } } */
+ return x;
+}
+
+void
+test_main (void)
+{
+ if (foo (20) != 28)
+ abort ();
+}
--- gcc/testsuite/gcc.dg/guality/pr56154-aux.c.jj 2013-01-30 17:47:08.467632262 +0100
+++ gcc/testsuite/gcc.dg/guality/pr56154-aux.c 2013-01-30 17:14:28.000000000 +0100
@@ -0,0 +1,11 @@
+/* PR debug/56154 */
+/* { dg-do compile } */
+
+extern void test_main (void);
+
+int
+main ()
+{
+ test_main ();
+ return 0;
+}

86
gcc48-pr56228.patch Normal file
View File

@ -0,0 +1,86 @@
2013-02-06 Jakub Jelinek <jakub@redhat.com>
PR target/56228
* config/rs6000/rs6000.md (ptrm): New mode attr.
(call_indirect_aix<ptrsize>, call_indirect_aix<ptrsize>_nor11,
call_value_indirect_aix<pttrsize>,
call_value_indirect_aix<pttrsize>_nor11): Use <ptrm> instead of
m in constraints.
* gcc.dg/pr56228.c: New test.
--- gcc/config/rs6000/rs6000.md.jj 2013-02-01 17:52:37.000000000 +0100
+++ gcc/config/rs6000/rs6000.md 2013-02-06 17:27:07.680250027 +0100
@@ -292,6 +292,9 @@ (define_mode_attr mptrsize [(SI "si")
(define_mode_attr ptrload [(SI "lwz")
(DI "ld")])
+(define_mode_attr ptrm [(SI "m")
+ (DI "Y")])
+
(define_mode_attr rreg [(SF "f")
(DF "ws")
(V4SF "wf")
@@ -10662,8 +10665,8 @@ (define_insn "*call_value_local64"
(define_insn "call_indirect_aix<ptrsize>"
[(call (mem:SI (match_operand:P 0 "register_operand" "c,*l"))
(match_operand 1 "" "g,g"))
- (use (match_operand:P 2 "memory_operand" "m,m"))
- (set (reg:P TOC_REGNUM) (match_operand:P 3 "memory_operand" "m,m"))
+ (use (match_operand:P 2 "memory_operand" "<ptrm>,<ptrm>"))
+ (set (reg:P TOC_REGNUM) (match_operand:P 3 "memory_operand" "<ptrm>,<ptrm>"))
(use (reg:P STATIC_CHAIN_REGNUM))
(clobber (reg:P LR_REGNO))]
"DEFAULT_ABI == ABI_AIX && TARGET_POINTERS_TO_NESTED_FUNCTIONS"
@@ -10680,8 +10683,8 @@ (define_insn "call_indirect_aix<ptrsize>
(define_insn "call_indirect_aix<ptrsize>_nor11"
[(call (mem:SI (match_operand:P 0 "register_operand" "c,*l"))
(match_operand 1 "" "g,g"))
- (use (match_operand:P 2 "memory_operand" "m,m"))
- (set (reg:P TOC_REGNUM) (match_operand:P 3 "memory_operand" "m,m"))
+ (use (match_operand:P 2 "memory_operand" "<ptrm>,<ptrm>"))
+ (set (reg:P TOC_REGNUM) (match_operand:P 3 "memory_operand" "<ptrm>,<ptrm>"))
(clobber (reg:P LR_REGNO))]
"DEFAULT_ABI == ABI_AIX && !TARGET_POINTERS_TO_NESTED_FUNCTIONS"
"<ptrload> 2,%2\;b%T0l\;<ptrload> 2,%3"
@@ -10698,8 +10701,8 @@ (define_insn "call_value_indirect_aix<pt
[(set (match_operand 0 "" "")
(call (mem:SI (match_operand:P 1 "register_operand" "c,*l"))
(match_operand 2 "" "g,g")))
- (use (match_operand:P 3 "memory_operand" "m,m"))
- (set (reg:P TOC_REGNUM) (match_operand:P 4 "memory_operand" "m,m"))
+ (use (match_operand:P 3 "memory_operand" "<ptrm>,<ptrm>"))
+ (set (reg:P TOC_REGNUM) (match_operand:P 4 "memory_operand" "<ptrm>,<ptrm>"))
(use (reg:P STATIC_CHAIN_REGNUM))
(clobber (reg:P LR_REGNO))]
"DEFAULT_ABI == ABI_AIX && TARGET_POINTERS_TO_NESTED_FUNCTIONS"
@@ -10718,8 +10721,8 @@ (define_insn "call_value_indirect_aix<pt
[(set (match_operand 0 "" "")
(call (mem:SI (match_operand:P 1 "register_operand" "c,*l"))
(match_operand 2 "" "g,g")))
- (use (match_operand:P 3 "memory_operand" "m,m"))
- (set (reg:P TOC_REGNUM) (match_operand:P 4 "memory_operand" "m,m"))
+ (use (match_operand:P 3 "memory_operand" "<ptrm>,<ptrm>"))
+ (set (reg:P TOC_REGNUM) (match_operand:P 4 "memory_operand" "<ptrm>,<ptrm>"))
(clobber (reg:P LR_REGNO))]
"DEFAULT_ABI == ABI_AIX && !TARGET_POINTERS_TO_NESTED_FUNCTIONS"
"<ptrload> 2,%3\;b%T1l\;<ptrload> 2,%4"
--- gcc/testsuite/gcc.dg/pr56228.c.jj 2013-02-06 17:44:33.409303617 +0100
+++ gcc/testsuite/gcc.dg/pr56228.c 2013-02-06 17:44:14.000000000 +0100
@@ -0,0 +1,16 @@
+/* PR target/56228 */
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+
+short a[14] = { 1, 2 };
+short b[15] = { 3, 4 };
+
+int
+foo ()
+{
+ void (*fna) (void) = (void (*) (void)) a;
+ void (*fnb) (void) = (void (*) (void)) b;
+ fna ();
+ fnb ();
+ return a[1] == b[1];
+}

View File

@ -1,4 +1,4 @@
be78a47bd82523250eb3e91646db5b3d cloog-0.18.0.tar.gz be78a47bd82523250eb3e91646db5b3d cloog-0.18.0.tar.gz
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
bce1586384d8635a76d2f017fb067cd2 isl-0.11.1.tar.bz2 bce1586384d8635a76d2f017fb067cd2 isl-0.11.1.tar.bz2
d055987caf9f93fa3b2dc6bddb89dfd6 gcc-4.8.0-20130131.tar.bz2 c357247b133cc019759496a4983ceb79 gcc-4.8.0-20130206.tar.bz2