Hello community, here is the log from the commit of package gcc43 checked in at Tue Nov 6 00:01:51 CET 2007. -------- --- gcc43/gcc43.changes 2007-10-30 11:21:31.000000000 +0100 +++ /mounts/work_src_done/STABLE/gcc43/gcc43.changes 2007-11-05 23:51:57.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Nov 5 23:51:31 CET 2007 - rguenther@suse.de + +- Fix ia64 stack-protector patch. +- Add patch for PR32260. + +------------------------------------------------------------------- libgcj43.changes: same change New: ---- pr32260.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gcc43.spec ++++++ --- /var/tmp/diff_new_pack.s12830/_old 2007-11-06 00:00:18.000000000 +0100 +++ /var/tmp/diff_new_pack.s12830/_new 2007-11-06 00:00:18.000000000 +0100 @@ -102,7 +102,7 @@ Url: http://gcc.gnu.org/ License: GPL v3 or later Version: 4.3.0_20071016 -Release: 8 +Release: 11 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.3 @@ -137,6 +137,7 @@ Patch28: pr33870.diff Patch29: pr33868.diff Patch30: pr33871.diff +Patch31: pr32260.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -1247,6 +1248,7 @@ %patch28 %patch29 %patch30 +%patch31 %patch51 %patch55 %patch57 @@ -2211,6 +2213,9 @@ %doc testresults/*.log %endif %changelog +* Mon Nov 05 2007 - rguenther@suse.de +- Fix ia64 stack-protector patch. +- Add patch for PR32260. * Tue Oct 30 2007 - rguenther@suse.de - Fix rpmlint override files. * Mon Oct 29 2007 - rguenther@suse.de ++++++ libgcj43.spec ++++++ --- /var/tmp/diff_new_pack.s12830/_old 2007-11-06 00:00:18.000000000 +0100 +++ /var/tmp/diff_new_pack.s12830/_new 2007-11-06 00:00:18.000000000 +0100 @@ -114,7 +114,7 @@ Url: http://gcc.gnu.org/ License: GPL v2 or later; LGPL v2.1 or later Version: 4.3.0_20071016 -Release: 10 +Release: 14 %define gcc_version %(echo %version | sed 's/_.*//') %define snapshot_date %(echo %version | sed 's/[34]\.[0-4]\.[0-6]//' | sed 's/_/-/') %define binsuffix -4.3 @@ -149,6 +149,7 @@ Patch28: pr33870.diff Patch29: pr33868.diff Patch30: pr33871.diff +Patch31: pr32260.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -511,6 +512,7 @@ %patch28 %patch29 %patch30 +%patch31 %patch51 %patch55 %patch57 @@ -1049,6 +1051,9 @@ %doc testresults/*.log %endif %changelog +* Mon Nov 05 2007 - rguenther@suse.de +- Fix ia64 stack-protector patch. +- Add patch for PR32260. * Tue Oct 30 2007 - rguenther@suse.de - Fix rpmlint override files. * Mon Oct 29 2007 - rguenther@suse.de ++++++ gcc41-ia64-stack-protector.patch ++++++ --- /var/tmp/diff_new_pack.s12830/_old 2007-11-06 00:00:20.000000000 +0100 +++ /var/tmp/diff_new_pack.s12830/_new 2007-11-06 00:00:20.000000000 +0100 @@ -10,124 +10,159 @@ * config/ia64/ia64.md (stack_protect_set, stack_protect_test): New expanders. ---- gcc/config/ia64/linux.h.jj 2005-02-28 12:11:03.000000000 +0100 -+++ gcc/config/ia64/linux.h 2005-07-08 18:19:37.000000000 +0200 -@@ -58,3 +58,8 @@ do { \ - #define LINK_EH_SPEC "" - - #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" -+ -+#ifdef TARGET_LIBC_PROVIDES_SSP -+/* IA-64 glibc provides __stack_chk_guard in [r13-8]. */ -+#define TARGET_THREAD_SSP_OFFSET -8 -+#endif ---- gcc/config/ia64/ia64.c.jj 2005-07-08 16:14:51.000000000 +0200 -+++ gcc/config/ia64/ia64.c 2005-07-08 18:17:40.000000000 +0200 -@@ -2507,6 +2507,9 @@ ia64_compute_frame_size (HOST_WIDE_INT s - else - pretend_args_size = current_function_pretend_args_size; - -+ if (FRAME_GROWS_DOWNWARD) -+ size = IA64_STACK_ALIGN (size); -+ - total_size = (spill_size + extra_spill_size + size + pretend_args_size - + current_function_outgoing_args_size); - total_size = IA64_STACK_ALIGN (total_size); -@@ -2531,32 +2534,19 @@ ia64_compute_frame_size (HOST_WIDE_INT s - HOST_WIDE_INT - ia64_initial_elimination_offset (int from, int to) - { -- HOST_WIDE_INT offset; -+ HOST_WIDE_INT offset, size = get_frame_size (); - -- ia64_compute_frame_size (get_frame_size ()); -+ ia64_compute_frame_size (size); - switch (from) - { - case FRAME_POINTER_REGNUM: -- switch (to) -- { -- case HARD_FRAME_POINTER_REGNUM: -- if (current_function_is_leaf) -- offset = -current_frame_info.total_size; -- else -- offset = -(current_frame_info.total_size -- - current_function_outgoing_args_size - 16); -- break; -- -- case STACK_POINTER_REGNUM: -- if (current_function_is_leaf) -- offset = 0; -- else -- offset = 16 + current_function_outgoing_args_size; -- break; -- -- default: -- gcc_unreachable (); -- } -+ offset = FRAME_GROWS_DOWNWARD ? IA64_STACK_ALIGN (size) : 0; -+ if (!current_function_is_leaf) -+ offset += 16 + current_function_outgoing_args_size; -+ if (to == HARD_FRAME_POINTER_REGNUM) -+ offset -= current_frame_info.total_size; -+ else -+ gcc_assert (to == STACK_POINTER_REGNUM); - break; - - case ARG_POINTER_REGNUM: ---- gcc/config/ia64/ia64.md.jj 2005-05-16 23:32:52.000000000 +0200 -+++ gcc/config/ia64/ia64.md 2005-07-08 18:39:59.000000000 +0200 -@@ -6248,5 +6248,42 @@ - "addp4 %0 = %1, %2" - [(set_attr "itanium_class" "ialu")]) - -+;; -+;; Stack guard expanders -+ -+(define_expand "stack_protect_set" -+ [(set (match_operand 0 "memory_operand" "") -+ (match_operand 1 "memory_operand" ""))] -+ "" -+{ -+#ifdef TARGET_THREAD_SSP_OFFSET -+ rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13); -+ rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx, -+ GEN_INT (TARGET_THREAD_SSP_OFFSET))); -+ MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]); -+ operands[1] = canary; -+#endif -+ emit_move_insn (operands[0], operands[1]); -+ DONE; -+}) -+ -+(define_expand "stack_protect_test" -+ [(match_operand 0 "memory_operand" "") -+ (match_operand 1 "memory_operand" "") -+ (match_operand 2 "" "")] -+ "" -+{ -+#ifdef TARGET_THREAD_SSP_OFFSET -+ rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13); -+ rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx, -+ GEN_INT (TARGET_THREAD_SSP_OFFSET))); -+ MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]); -+ operands[1] = canary; -+#endif -+ emit_cmp_and_jump_insns (operands[0], operands[1], EQ, NULL_RTX, -+ ptr_mode, 1, operands[2]); -+ DONE; -+}) -+ - ;; Vector operations - (include "vect.md") ---- gcc/config/ia64/ia64.h.jj 2005-07-08 16:36:20.000000000 +0200 -+++ gcc/config/ia64/ia64.h 2005-07-08 18:11:34.000000000 +0200 -@@ -1120,7 +1120,7 @@ enum reg_class - - /* Define this macro to non-zero if the addresses of local variable slots - are at negative offsets from the frame pointer. */ --#define FRAME_GROWS_DOWNWARD 0 -+#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0) - - /* Offset from the frame pointer to the first local variable slot to - be allocated. */ +Index: gcc/config/ia64/linux.h +=================================================================== +*** gcc/config/ia64/linux.h.orig 2006-12-12 16:47:58.000000000 +0100 +--- gcc/config/ia64/linux.h 2007-11-03 22:03:55.000000000 +0100 +*************** do { \ +*** 59,61 **** +--- 59,66 ---- + #define LINK_EH_SPEC "" + + #define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" ++ ++ #ifdef TARGET_LIBC_PROVIDES_SSP ++ /* IA-64 glibc provides __stack_chk_guard in [r13-8]. */ ++ #define TARGET_THREAD_SSP_OFFSET -8 ++ #endif +Index: gcc/config/ia64/ia64.c +=================================================================== +*** gcc/config/ia64/ia64.c.orig 2007-10-31 17:24:41.000000000 +0100 +--- gcc/config/ia64/ia64.c 2007-11-03 22:03:55.000000000 +0100 +*************** ia64_compute_frame_size (HOST_WIDE_INT s +*** 2578,2583 **** +--- 2578,2586 ---- + else + pretend_args_size = current_function_pretend_args_size; + ++ if (FRAME_GROWS_DOWNWARD) ++ size = IA64_STACK_ALIGN (size); ++ + total_size = (spill_size + extra_spill_size + size + pretend_args_size + + current_function_outgoing_args_size); + total_size = IA64_STACK_ALIGN (total_size); +*************** ia64_compute_frame_size (HOST_WIDE_INT s +*** 2602,2633 **** + HOST_WIDE_INT + ia64_initial_elimination_offset (int from, int to) + { +! HOST_WIDE_INT offset; + +! ia64_compute_frame_size (get_frame_size ()); + switch (from) + { + case FRAME_POINTER_REGNUM: +! switch (to) +! { +! case HARD_FRAME_POINTER_REGNUM: +! if (current_function_is_leaf) +! offset = -current_frame_info.total_size; +! else +! offset = -(current_frame_info.total_size +! - current_function_outgoing_args_size - 16); +! break; +! +! case STACK_POINTER_REGNUM: +! if (current_function_is_leaf) +! offset = 0; +! else +! offset = 16 + current_function_outgoing_args_size; +! break; +! +! default: +! gcc_unreachable (); +! } + break; + + case ARG_POINTER_REGNUM: +--- 2605,2623 ---- + HOST_WIDE_INT + ia64_initial_elimination_offset (int from, int to) + { +! HOST_WIDE_INT offset, size = get_frame_size (); + +! ia64_compute_frame_size (size); + switch (from) + { + case FRAME_POINTER_REGNUM: +! offset = FRAME_GROWS_DOWNWARD ? IA64_STACK_ALIGN (size) : 0; +! if (!current_function_is_leaf) +! offset += 16 + current_function_outgoing_args_size; +! if (to == HARD_FRAME_POINTER_REGNUM) +! offset -= current_frame_info.total_size; +! else +! gcc_assert (to == STACK_POINTER_REGNUM); + break; + + case ARG_POINTER_REGNUM: +Index: gcc/config/ia64/ia64.md +=================================================================== +*** gcc/config/ia64/ia64.md.orig 2007-10-29 14:34:08.000000000 +0100 +--- gcc/config/ia64/ia64.md 2007-11-03 22:03:55.000000000 +0100 +*************** +*** 6416,6421 **** +--- 6416,6458 ---- + "mov %0 = ip" + [(set_attr "itanium_class" "frbr")]) + ++ ;; ++ ;; Stack guard expanders ++ ++ (define_expand "stack_protect_set" ++ [(set (match_operand 0 "memory_operand" "") ++ (match_operand 1 "memory_operand" ""))] ++ "" ++ { ++ #ifdef TARGET_THREAD_SSP_OFFSET ++ rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13); ++ rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx, ++ GEN_INT (TARGET_THREAD_SSP_OFFSET))); ++ MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]); ++ operands[1] = canary; ++ #endif ++ emit_move_insn (operands[0], operands[1]); ++ DONE; ++ }) ++ ++ (define_expand "stack_protect_test" ++ [(match_operand 0 "memory_operand" "") ++ (match_operand 1 "memory_operand" "") ++ (match_operand 2 "" "")] ++ "" ++ { ++ #ifdef TARGET_THREAD_SSP_OFFSET ++ rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13); ++ rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx, ++ GEN_INT (TARGET_THREAD_SSP_OFFSET))); ++ MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]); ++ operands[1] = canary; ++ #endif ++ emit_cmp_and_jump_insns (operands[0], operands[1], EQ, NULL_RTX, ++ ptr_mode, 1, operands[2]); ++ DONE; ++ }) ++ + ;; Vector operations + (include "vect.md") + ;; Atomic operations +Index: gcc/config/ia64/ia64.h +=================================================================== +*** gcc/config/ia64/ia64.h.orig 2007-10-29 14:34:08.000000000 +0100 +--- gcc/config/ia64/ia64.h 2007-11-03 22:03:55.000000000 +0100 +*************** enum reg_class +*** 902,908 **** + + /* Define this macro to nonzero if the addresses of local variable slots + are at negative offsets from the frame pointer. */ +! #define FRAME_GROWS_DOWNWARD 0 + + /* Offset from the frame pointer to the first local variable slot to + be allocated. */ +--- 902,908 ---- + + /* Define this macro to nonzero if the addresses of local variable slots + are at negative offsets from the frame pointer. */ +! #define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0) + + /* Offset from the frame pointer to the first local variable slot to + be allocated. */ ++++++ gcc.spec.in ++++++ --- gcc43/gcc.spec.in 2007-10-29 14:30:20.000000000 +0100 +++ /mounts/work_src_done/STABLE/gcc43/gcc.spec.in 2007-11-05 23:46:31.000000000 +0100 @@ -155,6 +155,7 @@ Patch28: pr33870.diff Patch29: pr33868.diff Patch30: pr33871.diff +Patch31: pr32260.diff # A set of patches from the RH srpm Patch51: gcc41-ia64-stack-protector.patch Patch55: gcc41-java-slow_pthread_self.patch @@ -785,6 +786,7 @@ %patch28 %patch29 %patch30 +%patch31 %patch51 %patch55 %patch57 ++++++ pr32260.diff ++++++ Index: gcc/testsuite/g++.dg/rtti/typeid7.C =================================================================== --- gcc/testsuite/g++.dg/rtti/typeid7.C (revision 0) +++ gcc/testsuite/g++.dg/rtti/typeid7.C (revision 129835) @@ -0,0 +1,61 @@ +// PR c++/32260 +// { dg-do compile } +// { dg-options "-O2 -W -Wall" } + +#include <typeinfo> + +const std::type_info & +f1 (int i) +{ + return typeid (i + 1); +} + +const std::type_info & +f2 () +{ + return typeid (int); +} + +struct A +{ + A (); + virtual ~A (); + void foo (); +}; + +const std::type_info & +f3 () +{ + return typeid (A); +} + +const std::type_info & +f4 (A *p) +{ + return typeid (*p); +} + +const std::type_info & +f5 () +{ + return typeid (int *); +} + +const std::type_info & +f6 () +{ + return typeid (int [26][12]); +} + +const std::type_info & +f7 () +{ + return typeid (int [26][12]); +} + +void (A::*pmr) (); +const std::type_info & +f8 () +{ + return typeid (pmr); +} Index: gcc/cp/rtti.c =================================================================== --- gcc/cp/rtti.c (revision 129834) +++ gcc/cp/rtti.c (revision 129835) @@ -79,7 +79,7 @@ DEF_VEC_ALLOC_O(tinfo_s,gc); typedef enum tinfo_kind { - TK_TYPE_INFO_TYPE, /* std::type_info */ + TK_TYPE_INFO_TYPE, /* abi::__type_info_pseudo */ TK_BASE_TYPE, /* abi::__base_class_type_info */ TK_BUILTIN_TYPE, /* abi::__fundamental_type_info */ TK_ARRAY_TYPE, /* abi::__array_type_info */ @@ -264,6 +264,8 @@ get_tinfo_decl_dynamic (tree exp) static bool typeid_ok_p (void) { + tree pseudo_type_info, type_info_type; + if (! flag_rtti) { error ("cannot use typeid with -fno-rtti"); @@ -276,6 +278,18 @@ typeid_ok_p (void) return false; } + pseudo_type_info + = VEC_index (tinfo_s, tinfo_descs, TK_TYPE_INFO_TYPE)->type; + type_info_type = TYPE_MAIN_VARIANT (const_type_info_type_node); + + /* Make sure abi::__type_info_pseudo has the same alias set + as std::type_info. */ + if (! TYPE_ALIAS_SET_KNOWN_P (pseudo_type_info)) + TYPE_ALIAS_SET (pseudo_type_info) = get_alias_set (type_info_type); + else + gcc_assert (TYPE_ALIAS_SET (pseudo_type_info) + == get_alias_set (type_info_type)); + return true; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org