From c9aef059c59da2de9835e73c74bb35da49caa4ab Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Feb 08 2013 18:18:31 +0000 Subject: 4.8.0-0.10 --- diff --git a/.gitignore b/.gitignore index 9943373..cea4278 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ /gcc-4.8.0-20130129.tar.bz2 /gcc-4.8.0-20130131.tar.bz2 /gcc-4.8.0-20130206.tar.bz2 +/gcc-4.8.0-20130208.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 34bb0ea..ab4d70a 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20130206 -%global SVNREV 195813 +%global DATE 20130208 +%global SVNREV 195894 %global gcc_version 4.8.0 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 0.9 +%global gcc_release 0.10 %global _unpackaged_files_terminate_build 0 %global multilib_64_archs sparc64 ppc64 s390x x86_64 %ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha @@ -194,10 +194,9 @@ Patch10: gcc48-pr38757.patch Patch11: gcc48-libstdc++-docs.patch Patch12: gcc48-no-add-needed.patch Patch13: gcc48-pr55608.patch -Patch14: gcc48-pr52448.patch -Patch15: gcc48-pr55978.patch -Patch16: gcc48-pr56154.patch -Patch17: gcc48-pr56228.patch +Patch14: gcc48-pr56256.patch +Patch15: gcc48-pr53948.patch +Patch16: gcc48-pr56245.patch Patch1000: fastjar-0.97-segfault.patch Patch1001: fastjar-0.97-len1.patch @@ -750,10 +749,9 @@ package or when debugging this package. %endif %patch12 -p0 -b .no-add-needed~ %patch13 -p0 -b .pr55608~ -%patch14 -p0 -b .pr52448~ -%patch15 -p0 -b .pr55978~ -%patch16 -p0 -b .pr56154~ -%patch17 -p0 -b .pr56228~ +%patch14 -p0 -b .pr56256~ +%patch15 -p0 -b .pr53948~ +%patch16 -p0 -b .pr56245~ %if 0%{?_enable_debug_packages} cat > split-debuginfo.sh <<\EOF @@ -817,9 +815,6 @@ tar xzf %{SOURCE4} tar xjf %{SOURCE10} %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 echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE @@ -2980,6 +2975,19 @@ fi %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %changelog +* Fri Feb 8 2013 Jakub Jelinek 4.8.0-0.10 +- updated from trunk + - PRs bootstrap/56227, c++/56235, c++/56237, c++/56239, c++/56241, + debug/53363, fortran/54339, fortran/55789, libstdc++/56193, + libstdc++/56216, lto/56231, middle-end/56181, + rtl-optimization/56195, rtl-optimization/56225, target/50678, + target/54009, target/54131, tree-optimization/56250 + - fix Ada frontend miscompilation with profiledbootstrap (#906516, + PR rtl-optimization/56178) +- restore parsing of ppc inline asm dialects (#909298, PR target/56256) +- fix up libiberty old regex (PR other/56245) +- fix IRA -O0 -g code debug regression (PR debug/53948) + * Wed Feb 6 2013 Jakub Jelinek 4.8.0-0.9 - updated from trunk - PRs c++/54122, c++/56177, c++/56208, debug/54793, fortran/47517, diff --git a/gcc48-pr52448.patch b/gcc48-pr52448.patch deleted file mode 100644 index 8ca6412..0000000 --- a/gcc48-pr52448.patch +++ /dev/null @@ -1,191 +0,0 @@ -2013-02-06 Michael Matz - - 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" } } */ diff --git a/gcc48-pr53948.patch b/gcc48-pr53948.patch new file mode 100644 index 0000000..e9847a2 --- /dev/null +++ b/gcc48-pr53948.patch @@ -0,0 +1,72 @@ +2013-02-08 Jeff Law + + PR debug/53948 + * emit-rtl.c (reg_is_parm_p): New function. + * regs.h (reg_is_parm_p): New prototype. + * ira-conflicts.c (ira_build_conflicts): Allow parameters in + callee-clobbered registers. + + * gcc.dg/debug/dwarf2/pr53948.c: New test. + +--- gcc/emit-rtl.c ++++ gcc/emit-rtl.c +@@ -919,6 +919,18 @@ gen_reg_rtx (enum machine_mode mode) + return val; + } + ++/* Return TRUE if REG is a PARM_DECL, FALSE otherwise. */ ++ ++bool ++reg_is_parm_p (rtx reg) ++{ ++ tree decl; ++ ++ gcc_assert (REG_P (reg)); ++ decl = REG_EXPR (reg); ++ return (decl && TREE_CODE (decl) == PARM_DECL); ++} ++ + /* Update NEW with the same attributes as REG, but with OFFSET added + to the REG_OFFSET. */ + +--- gcc/ira-conflicts.c ++++ gcc/ira-conflicts.c +@@ -895,8 +895,12 @@ ira_build_conflicts (void) + + if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0) + /* For debugging purposes don't put user defined variables in +- callee-clobbered registers. */ +- || (optimize == 0 && REG_USERVAR_P (allocno_reg))) ++ callee-clobbered registers. However, do allow parameters ++ in callee-clobbered registers to improve debugging. This ++ is a bit of a fragile hack. */ ++ || (optimize == 0 ++ && REG_USERVAR_P (allocno_reg) ++ && ! reg_is_parm_p (allocno_reg))) + { + IOR_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), + call_used_reg_set); +--- gcc/regs.h ++++ gcc/regs.h +@@ -89,6 +89,8 @@ REG_N_SETS (int regno) + #define SET_REG_N_SETS(N,V) (regstat_n_sets_and_refs[N].sets = V) + #define INC_REG_N_SETS(N,V) (regstat_n_sets_and_refs[N].sets += V) + ++/* Given a REG, return TRUE if the reg is a PARM_DECL, FALSE otherwise. */ ++extern bool reg_is_parm_p (rtx); + + /* Functions defined in regstat.c. */ + extern void regstat_init_n_sets_and_refs (void); +--- gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c 2012-11-17 15:43:17.572007394 +0100 ++++ gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c 2013-02-08 19:10:23.000000000 +0100 +@@ -0,0 +1,10 @@ ++/* Test that we emit a .line directive for the line ++ with local variable initializations. */ ++/* { dg-options "-O0 -g -dA" } */ ++/* { dg-final { scan-assembler ".loc 1 8 0|# line 8" } } */ ++ ++ ++int f (register int a, register int b) { ++ register int x = b, y = a; ++ return x + y; } ++ diff --git a/gcc48-pr55978.patch b/gcc48-pr55978.patch deleted file mode 100644 index 298d82a..0000000 --- a/gcc48-pr55978.patch +++ /dev/null @@ -1,49 +0,0 @@ -2013-02-06 Janus Weil - - 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 diff --git a/gcc48-pr56154.patch b/gcc48-pr56154.patch deleted file mode 100644 index 19a4863..0000000 --- a/gcc48-pr56154.patch +++ /dev/null @@ -1,318 +0,0 @@ -2013-01-30 Jakub Jelinek - - 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; -+} diff --git a/gcc48-pr56228.patch b/gcc48-pr56228.patch deleted file mode 100644 index f3000f9..0000000 --- a/gcc48-pr56228.patch +++ /dev/null @@ -1,86 +0,0 @@ -2013-02-06 Jakub Jelinek - - PR target/56228 - * config/rs6000/rs6000.md (ptrm): New mode attr. - (call_indirect_aix, call_indirect_aix_nor11, - call_value_indirect_aix, - call_value_indirect_aix_nor11): Use 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" - [(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" ",")) -+ (set (reg:P TOC_REGNUM) (match_operand:P 3 "memory_operand" ",")) - (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 - (define_insn "call_indirect_aix_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" ",")) -+ (set (reg:P TOC_REGNUM) (match_operand:P 3 "memory_operand" ",")) - (clobber (reg:P LR_REGNO))] - "DEFAULT_ABI == ABI_AIX && !TARGET_POINTERS_TO_NESTED_FUNCTIONS" - " 2,%2\;b%T0l\; 2,%3" -@@ -10698,8 +10701,8 @@ (define_insn "call_value_indirect_aix,")) -+ (set (reg:P TOC_REGNUM) (match_operand:P 4 "memory_operand" ",")) - (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,")) -+ (set (reg:P TOC_REGNUM) (match_operand:P 4 "memory_operand" ",")) - (clobber (reg:P LR_REGNO))] - "DEFAULT_ABI == ABI_AIX && !TARGET_POINTERS_TO_NESTED_FUNCTIONS" - " 2,%3\;b%T1l\; 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]; -+} diff --git a/gcc48-pr56245.patch b/gcc48-pr56245.patch new file mode 100644 index 0000000..874e39b --- /dev/null +++ b/gcc48-pr56245.patch @@ -0,0 +1,47 @@ +2013-02-08 Jakub Jelinek + + PR other/56245 + * regex.c (PTR_INT_TYPE): Define. + (EXTEND_BUFFER): Change incr type from int to PTR_INT_TYPE. + +--- gcc/regex.c.jj 2011-05-02 18:39:35.000000000 +0200 ++++ gcc/regex.c 2013-02-08 18:33:18.136802070 +0100 +@@ -46,9 +46,11 @@ + + # if defined STDC_HEADERS && !defined emacs + # include ++# define PTR_INT_TYPE ptrdiff_t + # else + /* We need this for `regex.h', and perhaps for the Emacs include files. */ + # include ++# define PTR_INT_TYPE long + # endif + + # define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) +@@ -2045,7 +2047,7 @@ static reg_errcode_t byte_compile_range + /* How many characters the new buffer can have? */ \ + wchar_count = bufp->allocated / sizeof(UCHAR_T); \ + if (wchar_count == 0) wchar_count = 1; \ +- /* Truncate the buffer to CHAR_T align. */ \ ++ /* Truncate the buffer to CHAR_T align. */ \ + bufp->allocated = wchar_count * sizeof(UCHAR_T); \ + RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T); \ + bufp->buffer = (char*)COMPILED_BUFFER_VAR; \ +@@ -2054,7 +2056,7 @@ static reg_errcode_t byte_compile_range + /* If the buffer moved, move all the pointers into it. */ \ + if (old_buffer != COMPILED_BUFFER_VAR) \ + { \ +- int incr = COMPILED_BUFFER_VAR - old_buffer; \ ++ PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer; \ + MOVE_BUFFER_POINTER (b); \ + MOVE_BUFFER_POINTER (begalt); \ + if (fixup_alt_jump) \ +@@ -2082,7 +2084,7 @@ static reg_errcode_t byte_compile_range + /* If the buffer moved, move all the pointers into it. */ \ + if (old_buffer != COMPILED_BUFFER_VAR) \ + { \ +- int incr = COMPILED_BUFFER_VAR - old_buffer; \ ++ PTR_INT_TYPE incr = COMPILED_BUFFER_VAR - old_buffer; \ + MOVE_BUFFER_POINTER (b); \ + MOVE_BUFFER_POINTER (begalt); \ + if (fixup_alt_jump) \ diff --git a/gcc48-pr56256.patch b/gcc48-pr56256.patch new file mode 100644 index 0000000..622c5cb --- /dev/null +++ b/gcc48-pr56256.patch @@ -0,0 +1,36 @@ +2013-02-08 Jakub Jelinek + + PR target/56256 + * config/rs6000/rs6000.h (ASSEMBLER_DIALECT): Define. + + * gcc.target/powerpc/pr56256.c: New test. + +--- gcc/config/rs6000/rs6000.h.jj 2013-01-11 09:03:12.000000000 +0100 ++++ gcc/config/rs6000/rs6000.h 2013-02-08 16:46:35.988977363 +0100 +@@ -356,6 +356,12 @@ extern const char *host_detect_local_cpu + #define PROCESSOR_DEFAULT PROCESSOR_PPC603 + #define PROCESSOR_DEFAULT64 PROCESSOR_RS64A + ++/* Specify the dialect of assembler to use. Only new mnemonics are supported ++ starting with GCC 4.8, i.e. just one dialect, but for backwards ++ compatibility with older inline asm ASSEMBLER_DIALECT needs to be ++ defined. */ ++#define ASSEMBLER_DIALECT 1 ++ + /* Debug support */ + #define MASK_DEBUG_STACK 0x01 /* debug stack applications */ + #define MASK_DEBUG_ARG 0x02 /* debug argument handling */ +--- gcc/testsuite/gcc.target/powerpc/pr56256.c.jj 2013-02-08 17:00:11.096171281 +0100 ++++ gcc/testsuite/gcc.target/powerpc/pr56256.c 2013-02-08 17:09:05.448004295 +0100 +@@ -0,0 +1,11 @@ ++/* PR target/56256 */ ++/* { dg-do assemble } */ ++/* { dg-options "-O2" } */ ++ ++int ++foo (void) ++{ ++ int a; ++ __asm__ ("{lil|li} %0,%1" : "=r" (a) : "I" (26)); ++ return a; ++} diff --git a/sources b/sources index a2b8afd..53d82cb 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ be78a47bd82523250eb3e91646db5b3d cloog-0.18.0.tar.gz 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz bce1586384d8635a76d2f017fb067cd2 isl-0.11.1.tar.bz2 -c357247b133cc019759496a4983ceb79 gcc-4.8.0-20130206.tar.bz2 +94f2b1c221e6f1561a93525c6679080c gcc-4.8.0-20130208.tar.bz2