From 7a6e13b7c210dd35129541d43a2c7f6ef6869c4a Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 18 Sep 2012 07:12:22 +0000 Subject: [PATCH] - err... commit modifed files as well --- gcc-ada-link.patch | 13 +- gcc-branch.diff | 3119 +++++++++++++----------------------- gcc-info.patch | 14 + gcc-plugin-decl-hook.patch | 224 +-- gcc.spec | 730 +++++++-- 5 files changed, 1768 insertions(+), 2332 deletions(-) diff --git a/gcc-ada-link.patch b/gcc-ada-link.patch index b664972..e3df27e 100644 --- a/gcc-ada-link.patch +++ b/gcc-ada-link.patch @@ -21,7 +21,7 @@ -$(MKDIR) ada/doctools $(CP) $^ ada/doctools - cd ada/doctools && $(GNATMAKE) -q xgnatugn -+ cd ada/doctools && $(GNATMAKE) -q xgnatugn -a0../rts ++ cd ada/doctools && $(GNATMAKE) -q xgnatugn -aO../rts # Note that gnat_ugn_unw.texi does not depend on xgnatugn # being built so we can distribute a pregenerated gnat_ugn_unw.info @@ -55,12 +55,15 @@ cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ libgnat$(soext) cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ -@@ -2546,7 +2547,7 @@ +--- a/gcc/ada/gcc-interface/Makefile.in~ 2011-03-27 13:01:06.697666231 +0200 ++++ b/gcc/ada/gcc-interface/Makefile.in 2011-03-27 13:08:55.725801177 +0200 +@@ -2500,7 +2500,7 @@ THREAD_KIND="$(THREAD_KIND)" \ gnatlib $(RM) $(RTSDIR)/libgna*$(soext) -- cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ -+ cd $(RTSDIR); ../../xgcc -B../../ -shared -shared-libgcc $(TARGET_LIBGCC2_CFLAGS) \ +- cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \ ++ cd $(RTSDIR); ../../xgcc -B../../ -shared -shared-libgcc $(GNATLIBCFLAGS) \ + $(TARGET_LIBGCC2_CFLAGS) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ - $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) + diff --git a/gcc-branch.diff b/gcc-branch.diff index 622f26d..bc5227d 100644 --- a/gcc-branch.diff +++ b/gcc-branch.diff @@ -1,2117 +1,1272 @@ -Index: libgomp/fortran.c +Index: gcc/targhooks.c =================================================================== ---- libgomp/fortran.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libgomp/fortran.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,4 +1,4 @@ --/* Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. -+/* Copyright (C) 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. - Contributed by Jakub Jelinek . - - This file is part of the GNU OpenMP Library (libgomp). -@@ -27,6 +27,7 @@ - #include "libgomp.h" - #include "libgomp_f.h" - #include -+#include - - #ifdef HAVE_ATTRIBUTE_ALIAS - /* Use internal aliases if possible. */ -@@ -244,6 +245,8 @@ - omp_lock_symver (omp_test_nest_lock_) - #endif - -+#define TO_INT(x) ((x) > INT_MIN ? (x) < INT_MAX ? (x) : INT_MAX : INT_MIN) -+ - void - omp_set_dynamic_ (const int32_t *set) - { -@@ -253,7 +256,7 @@ - void - omp_set_dynamic_8_ (const int64_t *set) - { -- omp_set_dynamic (*set); -+ omp_set_dynamic (!!*set); - } - - void -@@ -265,7 +268,7 @@ - void - omp_set_nested_8_ (const int64_t *set) - { -- omp_set_nested (*set); -+ omp_set_nested (!!*set); - } - - void -@@ -277,7 +280,7 @@ - void - omp_set_num_threads_8_ (const int64_t *set) - { -- omp_set_num_threads (*set); -+ omp_set_num_threads (TO_INT (*set)); - } - - int32_t -@@ -343,7 +346,7 @@ - void - omp_set_schedule_8_ (const int32_t *kind, const int64_t *modifier) - { -- omp_set_schedule (*kind, *modifier); -+ omp_set_schedule (*kind, TO_INT (*modifier)); - } - - void -@@ -381,7 +384,7 @@ - void - omp_set_max_active_levels_8_ (const int64_t *levels) - { -- omp_set_max_active_levels (*levels); -+ omp_set_max_active_levels (TO_INT (*levels)); - } - - int32_t -@@ -405,7 +408,7 @@ - int32_t - omp_get_ancestor_thread_num_8_ (const int64_t *level) - { -- return omp_get_ancestor_thread_num (*level); -+ return omp_get_ancestor_thread_num (TO_INT (*level)); - } - - int32_t -@@ -417,7 +420,7 @@ - int32_t - omp_get_team_size_8_ (const int64_t *level) - { -- return omp_get_team_size (*level); -+ return omp_get_team_size (TO_INT (*level)); - } - - int32_t -Index: libgomp/ChangeLog -=================================================================== ---- libgomp/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libgomp/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,15 @@ -+2011-05-06 Jakub Jelinek -+ -+ PR fortran/48894 -+ * fortran.c: Include limits.h. -+ (TO_INT): Define. -+ (omp_set_dynamic_8_, omp_set_num_threads_8_): Use !!*set instead of -+ *set. -+ (omp_set_num_threads_8_, omp_set_schedule_8_, -+ omp_set_max_active_levels_8_, omp_get_ancestor_thread_num_8_, -+ omp_get_team_size_8_): Use TO_INT macro. -+ * testsuite/libgomp.fortran/pr48894.f90: New test. -+ - 2011-04-28 Release Manager - - * GCC 4.5.3 released. -Index: libgomp/testsuite/libgomp.fortran/pr48894.f90 -=================================================================== ---- libgomp/testsuite/libgomp.fortran/pr48894.f90 (.../tags/gcc_4_5_3_release) (wersja 0) -+++ libgomp/testsuite/libgomp.fortran/pr48894.f90 (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,23 @@ -+! PR fortran/48894 -+! { dg-do run } -+! { dg-options "-fdefault-integer-8" } -+ -+ use omp_lib -+ integer, parameter :: zero = 0 -+ integer :: err -+ logical :: l -+ err = 0 -+ !$omp parallel -+ !$omp parallel private (l) -+ l = omp_get_ancestor_thread_num (-HUGE (zero)) .ne. -1 -+ l = l .or. (omp_get_ancestor_thread_num (HUGE (zero)) .ne. -1) -+ l = l .or. (omp_get_team_size (-HUGE (zero)) .ne. -1) -+ l = l .or. (omp_get_team_size (HUGE (zero)) .ne. -1) -+ if (l) then -+ !$omp atomic -+ err = err + 1 -+ endif -+ !$omp end parallel -+ !$omp end parallel -+ if (err .ne. 0) call abort -+end -Index: gcc/fwprop.c -=================================================================== ---- gcc/fwprop.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/fwprop.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -228,8 +228,11 @@ - - process_uses (df_get_artificial_uses (bb_index), DF_REF_AT_TOP); - process_defs (df_get_artificial_defs (bb_index), DF_REF_AT_TOP); -- df_simulate_initialize_forwards (bb, local_lr); - -+ /* We don't call df_simulate_initialize_forwards, as it may overestimate -+ the live registers if there are unused artificial defs. We prefer -+ liveness to be underestimated. */ -+ - FOR_BB_INSNS (bb, insn) - if (INSN_P (insn)) - { +--- gcc/targhooks.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/targhooks.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -529,6 +529,7 @@ + case scalar_to_vec: + case cond_branch_not_taken: + case vec_perm: ++ case vec_promote_demote: + return 1; + + case unaligned_load: Index: gcc/DATESTAMP =================================================================== ---- gcc/DATESTAMP (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/DATESTAMP (.../branches/gcc-4_5-branch) (wersja 173771) +--- gcc/DATESTAMP (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/DATESTAMP (.../branches/gcc-4_6-branch) (wersja 185440) @@ -1 +1 @@ --20110428 -+20110515 -Index: gcc/tree-tailcall.c -=================================================================== ---- gcc/tree-tailcall.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/tree-tailcall.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1007,6 +1007,14 @@ - integer_one_node); - } - -+ if (a_acc || m_acc) -+ { -+ /* When the tail call elimination using accumulators is performed, -+ statements adding the accumulated value are inserted at all exits. -+ This turns all other tail calls to non-tail ones. */ -+ opt_tailcalls = false; -+ } -+ - for (; tailcalls; tailcalls = next) - { - next = tailcalls->next; -Index: gcc/final.c -=================================================================== ---- gcc/final.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/final.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2241,6 +2241,11 @@ - location_t loc; - expanded_location expanded; - -+ /* Make sure we flush any queued register saves in case this -+ clobbers affected registers. */ -+ if (dwarf2out_do_frame ()) -+ dwarf2out_frame_debug (insn, false); -+ - /* There's no telling what that did to the condition codes. */ - CC_STATUS_INIT; - -Index: gcc/fold-const.c +-20120301 ++20120315 +Index: gcc/target.h =================================================================== ---- gcc/fold-const.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/fold-const.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2784,8 +2784,6 @@ - - case VOID_TYPE: - tem = fold_ignored_result (arg); -- if (TREE_CODE (tem) == MODIFY_EXPR) -- goto fold_convert_exit; - return fold_build1_loc (loc, NOP_EXPR, type, tem); - - default: +--- gcc/target.h (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/target.h (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -128,7 +128,8 @@ + scalar_to_vec, + cond_branch_not_taken, + cond_branch_taken, +- vec_perm ++ vec_perm, ++ vec_promote_demote + }; + + /* Sets of optimization levels at which an option may be enabled by Index: gcc/DEV-PHASE =================================================================== ---- gcc/DEV-PHASE (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/DEV-PHASE (.../branches/gcc-4_5-branch) (wersja 173771) +--- gcc/DEV-PHASE (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/DEV-PHASE (.../branches/gcc-4_6-branch) (wersja 185440) @@ -0,0 +1 @@ +prerelease Index: gcc/ChangeLog =================================================================== ---- gcc/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,177 @@ -+2011-05-11 Michael Meissner +--- gcc/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,101 @@ ++2012-03-15 Chung-Lin Tang + + Backport from mainline -+ 2011-05-10 Michael Meissner -+ -+ PR target/48857, 48495 -+ * config/rs6000/rs6000.h (VSX_SCALAR_MODE): Delete. -+ (VSX_MODE): Ditto. -+ (VSX_MOVE_MODE): Ditto. -+ (ALTIVEC_OR_VSX_VECTOR_MODE): New macro, combine all Altivec and -+ VSX vector types. Add V2DImode. -+ (HARD_REGNO_CALLER_SAVE_MODE): Use it instead of -+ ALTIVEC_VECTOR_MODE and VSX_VECTOR_MODE calls. -+ (MODES_TIEABLE_P): Ditto. -+ -+ * config/rs6000/rs6000.c (rs6000_emit_move): Use -+ ALTIVEC_OR_VSX_MODE instead of ALTIVEC_VECTOR_MODE and -+ VSX_VECTOR_MODE. -+ (init_cumulative_args): Ditto. -+ (rs6000_function_arg_boundary): Ditto. -+ (rs6000_function_arg_advance_1): Ditto. -+ (rs6000_function_arg): Ditto. -+ (rs6000_function_ok_for_sibcall): Ditto. -+ (emit_frame_save): Ditto. -+ (rs6000_function_value): Ditto. -+ (rs6000_libcall_value): Ditto. -+ -+2011-05-10 Jakub Jelinek -+ -+ Backported from mainline -+ 2011-05-07 Zdenek Dvorak ++ 2012-03-10 Chung-Lin Tang + -+ PR tree-optimization/48837 -+ * tree-tailcall.c (tree_optimize_tail_calls_1): Do not mark tailcalls -+ when accumulator transformation is performed. ++ PR rtl-optimization/52528 ++ * combine.c (can_combine_p): Add setting of subst_low_luid ++ before call to expand_field_assignment(). + -+2011-05-09 Eric Botcazou -+ -+ * var-tracking.c (find_mem_expr_in_1pdv): Fix thinko. -+ (dataflow_set_preserve_mem_locs): Likewise. -+ -+2011-05-07 Alan Modra -+ -+ PR target/48900 -+ * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Use -+ const0_rtx as the arg to the dummy __tls_get_addr libcall. -+ -+2011-05-05 Jason Merrill -+ -+ PR c++/40975 -+ * tree-inline.c (copy_tree_r): Handle STATEMENT_LIST. -+ -+2011-05-05 Julian Brown -+ -+ * config/arm/neon.md (vec_set_internal): Fix misplaced -+ parenthesis in D-register case. -+ -+2011-05-05 Ira Rosen -+ -+ Backport from mainline: -+ 2011-04-18 Ulrich Weigand -+ Ira Rosen -+ -+ PR target/48252 -+ * config/arm/arm.c (neon_emit_pair_result_insn): Swap arguments -+ to match neon_vzip/vuzp/vtrn_internal. -+ * config/arm/neon.md (neon_vtrn_internal): Make both -+ outputs explicitly dependent on both inputs. -+ (neon_vzip_internal, neon_vuzp_internal): Likewise. -+ -+2011-05-04 Uros Bizjak ++2012-03-12 John David Anglin + + Backport from mainline -+ 2011-04-21 Uros Bizjak -+ -+ PR target/48708 -+ * config/i386/i386.c (ix86_expand_vector_set) : Generate -+ vec_extract and vec_concat for non-SSE4_1 targets. -+ -+2011-05-04 Uros Bizjak ++ 2011-09-03 John David Anglin + -+ * config/i386/i386.md (*movdi_internal_rex64) : -+ Use %v prefix in insn mnemonic to handle TARGET_AVX. -+ (*movdi_internal): Use "maybe_vex" instead of "vex" in "prefix" -+ attribute calculation. -+ (*movdf_internal): Output AVX mnemonics. Add "prefix" attribute. -+ * config/i386/sse.md (*sse2_storeq_rex64): Do not emit %v prefix -+ for mov{q} mnemonic. -+ (*vec_extractv2di_1_rex64_avx): Ditto. -+ (*vec_concatv2di_rex64_sse4_1): Use %vmovd for reg<->xmm moves. -+ (*vec_concatv2di_rex64_sse): Use movd for reg<->xmm moves. -+ * config/i386/mmx.md (*mov_internal_rex64): Ditto. ++ PR Bug middle-end/50232 ++ * config/pa/pa.md (return): Define "return" insn pattern. ++ (epilogue): Use it when no epilogue is needed. ++ * config/pa/pa.c (pa_can_use_return_insn): New function. ++ * config/pa/pa-protos.h (pa_can_use_return_insn): Declare. + -+2011-05-03 Uros Bizjak -+ Jakub Jelinek ++ Backport for mainline ++ 2012-01-28 John David Anglin + -+ PR target/48774 -+ * config/i386/i386.c (ix86_match_ccmode): For CC{A,C,O,S}mode -+ only succeed if req_mode is the same as set_mode. ++ PR target/51871 ++ * config/pa/pa.c (pa_return_addr_rtx): Add support for PA2.0 export ++ stubs. + -+2011-05-03 Jakub Jelinek ++2012-03-06 Michael Meissner + + Backport from mainline -+ 2011-04-30 Jakub Jelinek ++ PR target/50310 ++ * config/rs6000/vector.md (vector_uneq): Add support for ++ UNEQ, LTGT, ORDERED, and UNORDERED IEEE vector comparisons. ++ (vector_ltgt): Likewise. ++ (vector_ordered): Likewise. ++ (vector_unordered): Likewise. ++ * config/rs6000/rs6000.c (rs6000_emit_vector_compare_inner): ++ Likewise. + -+ PR tree-optimization/48809 -+ * tree-switch-conversion.c (build_arrays): Compute tidx in unsigned -+ type. -+ (gen_inbound_check): Don't compute index_expr - range_min in utype -+ again, instead reuse SSA_NAME initialized in build_arrays. -+ Remove two useless gsi_for_stmt calls. ++2012-03-04 John David Anglin + -+ 2011-04-28 Jakub Jelinek -+ -+ PR middle-end/48597 -+ * final.c (final_scan_insn): Call dwarf2out_frame_debug even for -+ inline asm. -+ -+ 2011-04-27 Jakub Jelinek -+ -+ PR c/48742 -+ * c-typeck.c (build_binary_op): Don't wrap arguments if -+ int_operands is true. -+ -+ 2011-04-23 Jakub Jelinek -+ -+ PR c/48685 -+ * fold-const.c (fold_convert_loc): Add NOP_EXPR when casting -+ to VOID_TYPE even around MODIFY_EXPR. -+ -+2011-05-02 Ulrich Weigand -+ -+ PR middle-end/43085 -+ Backport from mainline: -+ -+ 2010-04-29 Bernd Schmidt -+ -+ From Dominique d'Humieres -+ PR bootstrap/43858 -+ * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs to compute -+ test_set. -+ -+ 2010-04-26 Bernd Schmidt -+ -+ * df-problems.c (df_simulate_initialize_forwards): Set, don't clear, -+ bits for artificial defs at the top of the block. -+ * fwprop.c (single_def_use_enter_block): Don't call it. -+ -+ 2010-04-22 Bernd Schmidt ++ Backport from mainline ++ 2012-03-01 John David Anglin + -+ * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and -+ df_simulate_find_noclobber_defs as appropriate. Keep track of an -+ extra set merge_set_noclobber, and use it to relax the final test -+ slightly. -+ * df.h (df_simulate_find_noclobber_defs): Declare. -+ * df-problems.c (df_simulate_find_defs): Don't ignore partial or -+ conditional defs. -+ (df_simulate_find_noclobber_defs): New function. ++ PR target/52408 ++ * config/pa/pa.md (zvdep_imm32): Change type of variable x from int to ++ unsigned HOST_WIDE_INT. ++ (zvdep_imm64): Likewise. ++ (vdepi_ior): Change type of variable x from int to HOST_WIDE_INT. ++ (vdepi_and): Likewise. ++ Likewise for unamed 64-bit patterns. ++ * config/pa/predicates.md (lhs_lshift_cint_operand): Update comment. + -+2011-04-29 John David Anglin ++2012-03-03 Eric Botcazou + -+ PR target/48288 -+ * config/pa/predicates.md (ior_operand): Delete predicate. -+ (cint_ior_operand, reg_or_cint_ior_operand): New predicates. -+ * config/pa/pa.md (iordi3): Use reg_or_cint_ior_operand predicate in -+ expander. Use cint_ior_operand in unnamed insn. -+ (iorsi3): Likewise. -+ * config/pa/pa-protos.h (ior_operand): Delete declarations. ++ PR target/52425 ++ Backport from mainline ++ 2011-05-22 Eric Botcazou + -+2011-04-28 Richard Guenther ++ * config/sparc/sparc.c (sparc_delegitimize_address): Handle ++ UNSPEC_MOVE_PIC pattern. + -+ * DEV-PHASE: Set back to prerelease. -+ * BASE-VER: Bump to 4.5.4. ++2012-03-02 Peter Bergner + - 2011-04-28 Release Manager - - * GCC 4.5.3 released. -Index: gcc/testsuite/gcc.c-torture/execute/pr48809.c ++ Backport from mainline ++ 2012-03-02 Peter Bergner ++ ++ * config/rs6000/vsx.md (vsx_set_): Reorder operands. ++ ++2012-03-02 Bill Schmidt ++ Ira Rosen ++ ++ PR tree-optimization/50031 ++ PR tree-optimization/50969 ++ * targhooks.c (default_builtin_vectorization_cost): Handle ++ vec_promote_demote. ++ * target.h (enum vect_cost_for_stmt): Add vec_promote_demote. ++ * tree-vect-loop.c (vect_get_single_scalar_iteraion_cost): Handle ++ all types of reduction and pattern statements. ++ (vect_estimate_min_profitable_iters): Likewise. ++ * tree-vect-stmts.c (vect_model_promotion_demotion_cost): New function. ++ (vect_model_store_cost): Use vec_perm rather than vector_stmt for ++ statement cost. ++ (vect_model_load_cost): Likewise. ++ (vect_get_load_cost): Likewise; add dump logic for explicit realigns. ++ (vectorizable_type_demotion): Call vect_model_promotion_demotion_cost. ++ (vectorizable_type_promotion): Likewise. ++ * config/spu/spu.c (spu_builtin_vectorization_cost): Handle ++ vec_promote_demote. ++ * config/i386/i386.c (ix86_builtin_vectorization_cost): Likewise. ++ * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Update ++ vec_perm for VSX and handle vec_promote_demote. ++ ++2012-03-01 Jakub Jelinek ++ ++ * BASE-VER: Set to 4.6.4. ++ * DEV-PHASE: Set to prerelease. ++ + 2012-03-01 Release Manager + + * GCC 4.6.3 released. +Index: gcc/testsuite/gcc.target/powerpc/pr52457.c =================================================================== ---- gcc/testsuite/gcc.c-torture/execute/pr48809.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.c-torture/execute/pr48809.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,60 @@ -+/* PR tree-optimization/48809 */ +--- gcc/testsuite/gcc.target/powerpc/pr52457.c (.../tags/gcc_4_6_3_release) (wersja 0) ++++ gcc/testsuite/gcc.target/powerpc/pr52457.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,34 @@ ++/* { dg-do run { target { powerpc*-*-linux* } } } */ ++/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ ++/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */ ++/* { dg-require-effective-target vsx_hw } */ ++/* { dg-options "-O1 -mcpu=power7" } */ + +extern void abort (void); + -+int -+foo (signed char x) -+{ -+ int y = 0; -+ switch (x) -+ { -+ case 0: y = 1; break; -+ case 1: y = 7; break; -+ case 2: y = 2; break; -+ case 3: y = 19; break; -+ case 4: y = 5; break; -+ case 5: y = 17; break; -+ case 6: y = 31; break; -+ case 7: y = 8; break; -+ case 8: y = 28; break; -+ case 9: y = 16; break; -+ case 10: y = 31; break; -+ case 11: y = 12; break; -+ case 12: y = 15; break; -+ case 13: y = 111; break; -+ case 14: y = 17; break; -+ case 15: y = 10; break; -+ case 16: y = 31; break; -+ case 17: y = 7; break; -+ case 18: y = 2; break; -+ case 19: y = 19; break; -+ case 20: y = 5; break; -+ case 21: y = 107; break; -+ case 22: y = 31; break; -+ case 23: y = 8; break; -+ case 24: y = 28; break; -+ case 25: y = 106; break; -+ case 26: y = 31; break; -+ case 27: y = 102; break; -+ case 28: y = 105; break; -+ case 29: y = 111; break; -+ case 30: y = 17; break; -+ case 31: y = 10; break; -+ case 32: y = 31; break; -+ case 98: y = 18; break; -+ case -62: y = 19; break; -+ } -+ return y; -+} ++typedef long long T; ++typedef T vl_t __attribute__((vector_size(2 * sizeof (T)))); + -+int -+main () ++vl_t ++buggy_func (T x) +{ -+ if (foo (98) != 18 || foo (97) != 0 || foo (99) != 0) -+ abort (); -+ if (foo (-62) != 19 || foo (-63) != 0 || foo (-61) != 0) -+ abort (); -+ if (foo (28) != 105 || foo (27) != 102 || foo (29) != 111) -+ abort (); -+ return 0; ++ vl_t w; ++ T *p = (T *)&w; ++ p[0] = p[1] = x; ++ return w; +} -Index: gcc/testsuite/gcc.c-torture/compile/pr48742.c -=================================================================== ---- gcc/testsuite/gcc.c-torture/compile/pr48742.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.c-torture/compile/pr48742.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,15 @@ -+/* PR c/48742 */ -+ -+void baz (int); + +int -+foo (void) -+{ -+ return 1 / 0 > 0; -+} -+ -+void -+bar (void) ++main(void) +{ -+ baz (1 <= 2 % (3 >> 1 > 5 / 6 == 3)); -+} -Index: gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c -=================================================================== ---- gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/arm/neon-vset_lanes8.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,21 @@ -+/* Test the `vset_lane_s8' ARM Neon intrinsic. */ -+ -+/* { dg-do run } */ -+/* { dg-require-effective-target arm_neon_hw } */ -+/* { dg-options "-O0" } */ -+/* { dg-add-options arm_neon } */ ++ vl_t rval; ++ T *pl; + -+#include "arm_neon.h" -+#include -+#include ++ pl = (T *) &rval; ++ rval = buggy_func (2); + -+int8x8_t x = { 1, 2, 3, 4, 5, 6, 7, 8 }; -+int8x8_t y = { 1, 2, 3, 16, 5, 6, 7, 8 }; -+ -+int main (void) -+{ -+ x = vset_lane_s8 (16, x, 3); -+ if (memcmp (&x, &y, sizeof (x)) != 0) -+ abort(); -+ return 0; -+} -Index: gcc/testsuite/gcc.target/arm/pr48252.c -=================================================================== ---- gcc/testsuite/gcc.target/arm/pr48252.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/arm/pr48252.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,31 @@ -+/* { dg-do run } */ -+/* { dg-require-effective-target arm_neon_hw } */ -+/* { dg-options "-O2" } */ -+/* { dg-add-options arm_neon } */ -+ -+#include "arm_neon.h" -+#include -+ -+int main(void) -+{ -+ uint8x8_t v1 = {1, 1, 1, 1, 1, 1, 1, 1}; -+ uint8x8_t v2 = {2, 2, 2, 2, 2, 2, 2, 2}; -+ uint8x8x2_t vd1, vd2; -+ union {uint8x8_t v; uint8_t buf[8];} d1, d2, d3, d4; -+ int i; -+ -+ vd1 = vzip_u8(v1, vdup_n_u8(0)); -+ vd2 = vzip_u8(v2, vdup_n_u8(0)); -+ -+ vst1_u8(d1.buf, vd1.val[0]); -+ vst1_u8(d2.buf, vd1.val[1]); -+ vst1_u8(d3.buf, vd2.val[0]); -+ vst1_u8(d4.buf, vd2.val[1]); -+ -+ for (i = 0; i < 8; i++) -+ if ((i % 2 == 0 && d4.buf[i] != 2) -+ || (i % 2 == 1 && d4.buf[i] != 0)) -+ abort (); -+ -+ return 0; -+} -Index: gcc/testsuite/gcc.target/powerpc/pr48857.c -=================================================================== ---- gcc/testsuite/gcc.target/powerpc/pr48857.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/powerpc/pr48857.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,25 @@ -+/* { dg-do compile { target { powerpc*-*-* } } } */ -+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ -+/* { dg-require-effective-target powerpc_vsx_ok } */ -+/* { dg-options "-O2 -mcpu=power7 -mabi=altivec" } */ -+/* { dg-final { scan-assembler-times "lxvd2x" 1 } } */ -+/* { dg-final { scan-assembler-times "stxvd2x" 1 } } */ -+/* { dg-final { scan-assembler-not "ld" } } */ -+/* { dg-final { scan-assembler-not "lwz" } } */ -+/* { dg-final { scan-assembler-not "stw" } } */ -+/* { dg-final { scan-assembler-not "addi" } } */ -+ -+typedef vector long long v2di_type; -+ -+v2di_type -+return_v2di (v2di_type *ptr) -+{ -+ return *ptr; /* should generate lxvd2x 34,0,3. */ -+} -+ -+void -+pass_v2di (v2di_type arg, v2di_type *ptr) -+{ -+ *ptr = arg; /* should generate stxvd2x 34,0,{3,5}. */ -+} -+ -Index: gcc/testsuite/gcc.target/i386/pr48708.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr48708.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.target/i386/pr48708.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,15 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -msse2" } */ -+ -+#include -+ -+typedef long long T __attribute__((may_alias)); -+struct S { __m128i d; }; -+ -+__m128i -+foo (long long *x, struct S *y, __m128i *z) -+{ -+ struct S s = *y; -+ ((T *) &s.d)[0] = *x; -+ return _mm_cmpeq_epi16 (s.d, *z); -+} -Index: gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,6 +1,6 @@ - /* { dg-do compile } */ - /* { dg-require-effective-target lp64 } */ --/* { dg-options "-O2 -msse4 -march=core2" } */ -+/* { dg-options "-O2 -msse4 -march=core2 -dp" } */ - - #include - -@@ -10,4 +10,4 @@ - return _mm_cvtsi64_si128 (b); - } - --/* { dg-final { scan-assembler "movq" } } */ -+/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64_sse4_1/3" 1 } } */ -Index: gcc/testsuite/gcc.dg/pr48774.c -=================================================================== ---- gcc/testsuite/gcc.dg/pr48774.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.dg/pr48774.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,38 @@ -+/* PR target/48774 */ -+/* { dg-do run } */ -+/* { dg-options "-O2 -funroll-loops" } */ -+ -+extern void abort (void); -+unsigned long int s[24] -+ = { 12, ~1, 12, ~2, 12, ~4, 12, ~8, 12, ~16, 12, ~32, -+ 12, ~64, 12, ~128, 12, ~256, 12, ~512, 12, ~1024, 12, ~2048 }; -+struct { int n; unsigned long *e[12]; } g -+ = { 12, { &s[0], &s[2], &s[4], &s[6], &s[8], &s[10], &s[12], &s[14], -+ &s[16], &s[18], &s[20], &s[22] } }; -+int c[12]; -+ -+__attribute__((noinline, noclone)) void -+foo (void) -+{ -+ int i, j; -+ for (i = 0; i < g.n; i++) -+ for (j = 0; j < g.n; j++) -+ { -+ if (i == j && j < g.e[0][0] && (g.e[i][1] & (1UL << j))) -+ abort (); -+ if (j < g.e[0][0] && (g.e[i][1] & (1UL << j))) -+ c[i]++; -+ } -+} ++ if (pl[0] != 2 || pl[1] != 2) ++ abort (); + -+int -+main () -+{ -+ int i; -+ asm volatile ("" : "+m" (s), "+m" (g), "+m" (c)); -+ foo (); -+ for (i = 0; i < 12; i++) -+ if (c[i] != 11) -+ abort (); + return 0; +} -Index: gcc/testsuite/gcc.dg/pr48837.c +Index: gcc/testsuite/gfortran.dg/intrinsic_8.f90 =================================================================== ---- gcc/testsuite/gcc.dg/pr48837.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.dg/pr48837.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,30 @@ -+/* PR tree-optimization/48837 */ -+/* { dg-do run } */ -+/* { dg-options "-O2" } */ -+ -+void abort (void); -+ -+__attribute__((noinline)) -+int baz(void) -+{ -+ return 1; -+} -+ -+inline const int *bar(const int *a, const int *b) -+{ -+ return *a ? a : b; -+} -+ -+int foo(int a, int b) -+{ -+ return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0); -+} -+ -+int main(void) -+{ -+ if (foo(0, 0) != 2) -+ abort(); -+ -+ return 0; -+} -+ -Index: gcc/testsuite/gcc.dg/pr48685.c +--- gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../tags/gcc_4_6_3_release) (wersja 0) ++++ gcc/testsuite/gfortran.dg/intrinsic_8.f90 (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,23 @@ ++! { dg-do compile } ++! ++! PR fortran/52452 ++! ++! Contributed by Roger Ferrer Ibanez ++! ++PROGRAM test_etime ++ IMPLICIT NONE ++ INTRINSIC :: etime ++ REAL(4) :: tarray(1:2) ++ REAL(4) :: result ++ ++ CALL etime(tarray, result) ++END PROGRAM test_etime ++ ++subroutine test_etime2 ++ IMPLICIT NONE ++ INTRINSIC :: etime ++ REAL(4) :: tarray(1:2) ++ REAL(4) :: result ++ ++ result = etime(tarray) ++END subroutine test_etime2 +Index: gcc/testsuite/gfortran.dg/proc_ptr_34.f90 =================================================================== ---- gcc/testsuite/gcc.dg/pr48685.c (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/gcc.dg/pr48685.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,11 @@ -+/* PR c/48685 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+ -+int -+main () -+{ -+ int v = 1; -+ (void) (1 == 2 ? (void) 0 : (v = 0)); -+ return v; -+} +--- gcc/testsuite/gfortran.dg/proc_ptr_34.f90 (.../tags/gcc_4_6_3_release) (wersja 0) ++++ gcc/testsuite/gfortran.dg/proc_ptr_34.f90 (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,79 @@ ++! { dg-do compile } ++! ++! PR fortran/52469 ++! ++! This was failing as the DECL of the proc pointer "func" ++! was used for the interface of the proc-pointer component "my_f_ptr" ++! rather than the decl of the proc-pointer target ++! ++! Contributed by palott@gmail.com ++! ++ ++module ExampleFuncs ++ implicit none ++ ++ ! NOTE: "func" is a procedure pointer! ++ pointer :: func ++ interface ++ function func (z) ++ real :: func ++ real, intent (in) :: z ++ end function func ++ end interface ++ ++ type Contains_f_ptr ++ procedure (func), pointer, nopass :: my_f_ptr ++ end type Contains_f_ptr ++contains ++ ++function f1 (x) ++ real :: f1 ++ real, intent (in) :: x ++ ++ f1 = 2.0 * x ++ ++ return ++end function f1 ++ ++function f2 (x) ++ real :: f2 ++ real, intent (in) :: x ++ ++ f2 = 3.0 * x**2 ++ ++ return ++end function f2 ++ ++function fancy (func, x) ++ real :: fancy ++ real, intent (in) :: x ++ ++ interface AFunc ++ function func (y) ++ real :: func ++ real, intent (in) ::y ++ end function func ++ end interface AFunc ++ ++ fancy = func (x) + 3.3 * x ++end function fancy ++ ++end module ExampleFuncs ++ ++ ++program test_proc_ptr ++ use ExampleFuncs ++ implicit none ++ ++ type (Contains_f_ptr), dimension (2) :: NewType ++ ++ !NewType(1) % my_f_ptr => f1 ++ NewType(2) % my_f_ptr => f2 ++ ++ !write (*, *) NewType(1) % my_f_ptr (3.0), NewType(2) % my_f_ptr (3.0) ++ write (6, *) NewType(2) % my_f_ptr (3.0) ! < Shall print '27.0' ++ ++ stop ++end program test_proc_ptr ++ ++! { dg-final { cleanup-modules "examplefuncs" } } Index: gcc/testsuite/ChangeLog =================================================================== ---- gcc/testsuite/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,82 @@ -+2011-05-11 Michael Meissner -+ -+ Backport from mainline -+ 2011-05-10 Michael Meissner -+ -+ PR target/48857 -+ * gcc.target/powerpc/pr48857.c: New file, make sure V2DI arguments -+ are passed and returned in vector registers. -+ -+2011-05-10 Jakub Jelinek -+ -+ Backported from mainline -+ 2011-05-07 Zdenek Dvorak -+ -+ PR tree-optimization/48837 -+ * gcc.dg/pr48837.c: New testcase. -+ -+2011-05-09 Jason Merrill -+ -+ * g++.dg/template/nontype23.C: New. -+ -+2011-05-05 Jason Merrill -+ -+ * g++.dg/init/new30.C: New. +--- gcc/testsuite/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/testsuite/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,23 @@ ++2012-03-10 Tobias Burnus + -+2011-05-05 Julian Brown ++ PR fortran/52469 ++ * gfortran.dg/proc_ptr_34.f90: New. + -+ * gcc.target/arm/neon-vset_lanes8.c: New test. -+ -+2011-05-05 Ira Rosen -+ -+ Backport from mainline: -+ 2011-04-18 Ulrich Weigand -+ Ira Rosen -+ -+ PR target/48252 -+ * gcc.target/arm/pr48252.c: New test. -+ -+2011-05-04 Uros Bizjak ++2012-03-06 Tobias Burnus + + Backport from mainline -+ 2011-04-21 Uros Bizjak ++ 2012-03-02 Tobias Burnus + -+ PR target/48708 -+ * gcc.target/i386/pr48708.c: New test. ++ PR fortran/52452 ++ * gfortran.dg/intrinsic_8.f90: New. + -+2011-05-04 Uros Bizjak ++2012-03-02 Peter Bergner + + Backport from mainline -+ 2010-12-08 H.J. Lu ++ 2012-03-02 Peter Bergner + -+ * gcc.target/i386/sse2-init-v2di-2.c: Add "-dp" and update -+ expected scan. ++ * gcc.target/powerpc/pr52457.c: New test. + -+2011-05-03 Jakub Jelinek -+ -+ PR target/48774 -+ * gcc.dg/pr48774.c: New test. -+ -+ Backport from mainline -+ 2011-04-30 Jakub Jelinek -+ -+ PR tree-optimization/48809 -+ * gcc.c-torture/execute/pr48809.c: New test. -+ -+ 2011-04-27 Jakub Jelinek -+ -+ PR c/48742 -+ * gcc.c-torture/compile/pr48742.c: New test. + 2012-03-01 Release Manager + + * GCC 4.6.3 released. +Index: gcc/fortran/ChangeLog +=================================================================== +--- gcc/fortran/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/fortran/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,18 @@ ++2012-03-10 Tobias Burnus + -+ 2011-04-23 Jakub Jelinek ++ PR fortran/52469 ++ * trans-types.c (gfc_get_function_type): Handle backend_decl ++ of a procedure pointer. + -+ PR c/48685 -+ * gcc.dg/pr48685.c: New test. ++2012-03-06 Tobias Burnus + -+2011-04-27 Jason Merrill ++ Backport from mainline ++ 2012-03-02 Tobias Burnus + -+ * g++.dg/parse/ambig6.C: New. ++ PR fortran/52452 ++ * resolve.c (resolve_intrinsic): Don't search for a ++ function if we know that it is a subroutine. + - 2011-04-28 Release Manager + 2012-03-01 Release Manager - * GCC 4.5.3 released. -Index: gcc/testsuite/g++.dg/parse/ambig6.C + * GCC 4.6.3 released. +Index: gcc/fortran/trans-types.c =================================================================== ---- gcc/testsuite/g++.dg/parse/ambig6.C (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/g++.dg/parse/ambig6.C (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,12 @@ -+// PR c++/48046 -+ -+namespace N1 { typedef int T; } // { dg-error "" } -+namespace N2 { typedef float T; } // { dg-error "" } +--- gcc/fortran/trans-types.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/fortran/trans-types.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -2519,7 +2519,11 @@ + || sym->attr.flavor == FL_PROGRAM); + + if (sym->backend_decl) +- return TREE_TYPE (sym->backend_decl); ++ { ++ if (sym->attr.proc_pointer) ++ return TREE_TYPE (TREE_TYPE (sym->backend_decl)); ++ return TREE_TYPE (sym->backend_decl); ++ } + + alternate_return = 0; + typelist = NULL_TREE; +Index: gcc/fortran/resolve.c +=================================================================== +--- gcc/fortran/resolve.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/fortran/resolve.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1452,7 +1452,7 @@ + + if (sym->intmod_sym_id) + isym = gfc_intrinsic_function_by_id ((gfc_isym_id) sym->intmod_sym_id); +- else ++ else if (!sym->attr.subroutine) + isym = gfc_find_function (sym->name); + + if (isym) +Index: gcc/BASE-VER +=================================================================== +--- gcc/BASE-VER (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/BASE-VER (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1 +1 @@ +-4.6.3 ++4.6.4 +Index: gcc/tree-vect-loop.c +=================================================================== +--- gcc/tree-vect-loop.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/tree-vect-loop.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -2104,7 +2104,8 @@ + if (stmt_info + && !STMT_VINFO_RELEVANT_P (stmt_info) + && (!STMT_VINFO_LIVE_P (stmt_info) +- || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)) ++ || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))) ++ && !STMT_VINFO_IN_PATTERN_P (stmt_info)) + continue; + + if (STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt))) +@@ -2251,11 +2252,19 @@ + { + gimple stmt = gsi_stmt (si); + stmt_vec_info stmt_info = vinfo_for_stmt (stmt); + -+int main() -+{ -+ using namespace N1; -+ using namespace N2; ++ if (STMT_VINFO_IN_PATTERN_P (stmt_info)) ++ { ++ stmt = STMT_VINFO_RELATED_STMT (stmt_info); ++ stmt_info = vinfo_for_stmt (stmt); ++ } + -+ static T t; // { dg-error "" } -+} -Index: gcc/testsuite/g++.dg/init/new30.C + /* Skip stmts that are not vectorized inside the loop. */ + if (!STMT_VINFO_RELEVANT_P (stmt_info) + && (!STMT_VINFO_LIVE_P (stmt_info) +- || STMT_VINFO_DEF_TYPE (stmt_info) != vect_reduction_def)) ++ || !VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))) + continue; ++ + vec_inside_cost += STMT_VINFO_INSIDE_OF_LOOP_COST (stmt_info) * factor; + /* FIXME: for stmts in the inner-loop in outer-loop vectorization, + some of the "outside" costs are generated inside the outer-loop. */ +Index: gcc/tree-vect-stmts.c =================================================================== ---- gcc/testsuite/g++.dg/init/new30.C (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/g++.dg/init/new30.C (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,15 @@ -+// PR c++/40975 -+ -+struct data_type -+{ -+ // constructor required to reproduce compiler bug -+ data_type() {} -+}; +--- gcc/tree-vect-stmts.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/tree-vect-stmts.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -623,6 +623,46 @@ + } + + ++/* Model cost for type demotion and promotion operations. PWR is normally ++ zero for single-step promotions and demotions. It will be one if ++ two-step promotion/demotion is required, and so on. Each additional ++ step doubles the number of instructions required. */ + -+struct ptr_type ++static void ++vect_model_promotion_demotion_cost (stmt_vec_info stmt_info, ++ enum vect_def_type *dt, int pwr) +{ -+ // array new as default argument required to reproduce compiler bug -+ ptr_type (data_type* ptr = new data_type[1]) { delete[] ptr; } -+}; ++ int i, tmp; ++ int inside_cost = 0, outside_cost = 0, single_stmt_cost; + -+ptr_type obj; -Index: gcc/testsuite/g++.dg/template/nontype23.C -=================================================================== ---- gcc/testsuite/g++.dg/template/nontype23.C (.../tags/gcc_4_5_3_release) (wersja 0) -+++ gcc/testsuite/g++.dg/template/nontype23.C (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -0,0 +1,9 @@ -+// PR c++/48936 ++ /* The SLP costs were already calculated during SLP tree build. */ ++ if (PURE_SLP_STMT (stmt_info)) ++ return; + -+template int foo (void); -+template struct S -+{ -+ static const unsigned int a = sizeof (T); -+ enum { c = sizeof (foo <(a == 0)> ()) }; -+}; -+S x; -Index: gcc/cp/ChangeLog -=================================================================== ---- gcc/cp/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/cp/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,3 +1,15 @@ -+2011-05-09 Jason Merrill ++ single_stmt_cost = vect_get_stmt_cost (vec_promote_demote); ++ for (i = 0; i < pwr + 1; i++) ++ { ++ tmp = (STMT_VINFO_TYPE (stmt_info) == type_promotion_vec_info_type) ? ++ (i + 1) : i; ++ inside_cost += vect_pow2 (tmp) * single_stmt_cost; ++ } + -+ PR c++/48936 -+ * decl2.c (mark_used): Instantiate constant variables even -+ in unevaluated context. ++ /* FORNOW: Assuming maximum 2 args per stmts. */ ++ for (i = 0; i < 2; i++) ++ { ++ if (dt[i] == vect_constant_def || dt[i] == vect_external_def) ++ outside_cost += vect_get_stmt_cost (vector_stmt); ++ } + -+2011-04-27 Jason Merrill ++ if (vect_print_dump_info (REPORT_COST)) ++ fprintf (vect_dump, "vect_model_promotion_demotion_cost: inside_cost = %d, " ++ "outside_cost = %d .", inside_cost, outside_cost); + -+ PR c++/48046 -+ * parser.c (cp_parser_diagnose_invalid_type_name): Commit -+ to tentative parse sooner. ++ /* Set the costs in STMT_INFO. */ ++ stmt_vinfo_set_inside_of_loop_cost (stmt_info, NULL, inside_cost); ++ stmt_vinfo_set_outside_of_loop_cost (stmt_info, NULL, outside_cost); ++} + - 2011-04-28 Release Manager + /* Function vect_cost_strided_group_size - * GCC 4.5.3 released. -Index: gcc/cp/decl2.c -=================================================================== ---- gcc/cp/decl2.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/cp/decl2.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -3991,8 +3991,6 @@ - void - mark_used (tree decl) - { -- HOST_WIDE_INT saved_processing_template_decl = 0; -- - /* If DECL is a BASELINK for a single function, then treat it just - like the DECL for the function. Otherwise, if the BASELINK is - for an overloaded function, we don't know which function was -@@ -4029,9 +4027,6 @@ - error ("used here"); - return; + For strided load or store, return the group_size only if it is the first +@@ -691,7 +731,7 @@ + { + /* Uses a high and low interleave operation for each needed permute. */ + inside_cost = ncopies * exact_log2(group_size) * group_size +- * vect_get_stmt_cost (vector_stmt); ++ * vect_get_stmt_cost (vec_perm); + + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, "vect_model_store_cost: strided group_size = %d .", +@@ -795,7 +835,7 @@ + { + /* Uses an even and odd extract operations for each needed permute. */ + inside_cost = ncopies * exact_log2(group_size) * group_size +- * vect_get_stmt_cost (vector_stmt); ++ * vect_get_stmt_cost (vec_perm); + + if (vect_print_dump_info (REPORT_COST)) + fprintf (vect_dump, "vect_model_load_cost: strided group_size = %d .", +@@ -855,7 +895,7 @@ + case dr_explicit_realign: + { + *inside_cost += ncopies * (2 * vect_get_stmt_cost (vector_load) +- + vect_get_stmt_cost (vector_stmt)); ++ + vect_get_stmt_cost (vec_perm)); + + /* FIXME: If the misalignment remains fixed across the iterations of + the containing loop, the following cost should be added to the +@@ -863,6 +903,9 @@ + if (targetm.vectorize.builtin_mask_for_load) + *inside_cost += vect_get_stmt_cost (vector_stmt); + ++ if (vect_print_dump_info (REPORT_COST)) ++ fprintf (vect_dump, "vect_model_load_cost: explicit realign"); ++ + break; + } + case dr_explicit_realign_optimized: +@@ -886,7 +929,12 @@ + } + + *inside_cost += ncopies * (vect_get_stmt_cost (vector_load) +- + vect_get_stmt_cost (vector_stmt)); ++ + vect_get_stmt_cost (vec_perm)); ++ ++ if (vect_print_dump_info (REPORT_COST)) ++ fprintf (vect_dump, ++ "vect_model_load_cost: explicit realign optimized"); ++ + break; + } + +@@ -2919,7 +2967,7 @@ + STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type; + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "=== vectorizable_demotion ==="); +- vect_model_simple_cost (stmt_info, ncopies, dt, NULL); ++ vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt); + return true; } -- /* If we don't need a value, then we don't need to synthesize DECL. */ -- if (cp_unevaluated_operand != 0) -- return; - /* We can only check DECL_ODR_USED on variables or functions with - DECL_LANG_SPECIFIC set, and these are also the only decls that we -@@ -4059,9 +4054,10 @@ - DECL. However, if DECL is a static data member initialized with - a constant, we need the value right now because a reference to - such a data member is not value-dependent. */ -- if (TREE_CODE (decl) == VAR_DECL -- && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl) -- && DECL_CLASS_SCOPE_P (decl)) -+ if (DECL_INTEGRAL_CONSTANT_VAR_P (decl) -+ && !DECL_INITIAL (decl) -+ && DECL_LANG_SPECIFIC (decl) -+ && DECL_TEMPLATE_INSTANTIATION (decl)) - { - /* Don't try to instantiate members of dependent types. We - cannot just use dependent_type_p here because this function -@@ -4071,12 +4067,14 @@ - if (CLASSTYPE_TEMPLATE_INFO ((DECL_CONTEXT (decl))) - && uses_template_parms (CLASSTYPE_TI_ARGS (DECL_CONTEXT (decl)))) - return; -- /* Pretend that we are not in a template, even if we are, so -- that the static data member initializer will be processed. */ -- saved_processing_template_decl = processing_template_decl; -- processing_template_decl = 0; -+ instantiate_decl (decl, /*defer_ok=*/false, -+ /*expl_inst_class_mem_p=*/false); +@@ -3217,7 +3265,7 @@ + STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type; + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "=== vectorizable_promotion ==="); +- vect_model_simple_cost (stmt_info, 2*ncopies, dt, NULL); ++ vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt); + return true; } -+ /* If we don't need a value, then we don't need to synthesize DECL. */ -+ if (cp_unevaluated_operand != 0) -+ return; -+ - if (processing_template_decl) - return; +Index: gcc/combine.c +=================================================================== +--- gcc/combine.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/combine.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1788,6 +1788,10 @@ + if (set == 0) + return 0; -@@ -4149,8 +4147,6 @@ - need. Therefore, we always try to defer instantiation. */ - instantiate_decl (decl, /*defer_ok=*/true, - /*expl_inst_class_mem_p=*/false); -- -- processing_template_decl = saved_processing_template_decl; - } ++ /* The simplification in expand_field_assignment may call back to ++ get_last_value, so set safe guard here. */ ++ subst_low_luid = DF_INSN_LUID (insn); ++ + set = expand_field_assignment (set); + src = SET_SRC (set), dest = SET_DEST (set); - #include "gt-cp-decl2.h" -Index: gcc/cp/parser.c +Index: gcc/config/spu/spu.c =================================================================== ---- gcc/cp/parser.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/cp/parser.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2333,6 +2333,7 @@ - location_t location) - { - tree decl, old_scope; -+ cp_parser_commit_to_tentative_parse (parser); - /* Try to lookup the identifier. */ - old_scope = parser->scope; - parser->scope = scope; -@@ -2423,7 +2424,6 @@ - else - gcc_unreachable (); - } -- cp_parser_commit_to_tentative_parse (parser); - } - - /* Check for a common situation where a type-name should be present, -Index: gcc/ifcvt.c +--- gcc/config/spu/spu.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/spu/spu.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -6794,6 +6794,7 @@ + case scalar_to_vec: + case cond_branch_not_taken: + case vec_perm: ++ case vec_promote_demote: + return 1; + + case scalar_store: +Index: gcc/config/sparc/sparc.c =================================================================== ---- gcc/ifcvt.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/ifcvt.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -3818,7 +3818,7 @@ - basic_block other_bb, basic_block new_dest, int reversep) +--- gcc/config/sparc/sparc.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/sparc/sparc.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -3658,13 +3658,17 @@ { - rtx head, end, jump, earliest = NULL_RTX, old_dest, new_label = NULL_RTX; -- bitmap merge_set = NULL; -+ bitmap merge_set = NULL, merge_set_noclobber = NULL; - /* Number of pending changes. */ - int n_validated_changes = 0; - -@@ -3951,11 +3951,14 @@ - - /* Collect: - MERGE_SET = set of registers set in MERGE_BB -+ MERGE_SET_NOCLOBBER = like MERGE_SET, but only includes registers -+ that are really set, not just clobbered. - TEST_LIVE = set of registers live at EARLIEST -- TEST_SET = set of registers set between EARLIEST and the -- end of the block. */ -+ TEST_SET = set of registers set between EARLIEST and the -+ end of the block. */ - - merge_set = BITMAP_ALLOC (®_obstack); -+ merge_set_noclobber = BITMAP_ALLOC (®_obstack); - - /* If we allocated new pseudos (e.g. in the conditional move - expander called from noce_emit_cmove), we must resize the -@@ -3967,13 +3970,8 @@ - { - if (NONDEBUG_INSN_P (insn)) - { -- unsigned int uid = INSN_UID (insn); -- df_ref *def_rec; -- for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) -- { -- df_ref def = *def_rec; -- bitmap_set_bit (merge_set, DF_REF_REGNO (def)); -- } -+ df_simulate_find_defs (insn, merge_set); -+ df_simulate_find_noclobber_defs (insn, merge_set_noclobber); - } - } - -@@ -3984,7 +3982,7 @@ - unsigned i; - bitmap_iterator bi; - -- EXECUTE_IF_SET_IN_BITMAP (merge_set, 0, i, bi) -+ EXECUTE_IF_SET_IN_BITMAP (merge_set_noclobber, 0, i, bi) - { - if (i < FIRST_PSEUDO_REGISTER - && ! fixed_regs[i] -@@ -4015,12 +4013,14 @@ - } - - /* We can perform the transformation if -- MERGE_SET & (TEST_SET | TEST_LIVE) -+ MERGE_SET_NOCLOBBER & TEST_SET - and -+ MERGE_SET & TEST_LIVE -+ and - TEST_SET & DF_LIVE_IN (merge_bb) - are empty. */ - -- if (bitmap_intersect_p (merge_set, test_set) -+ if (bitmap_intersect_p (merge_set_noclobber, test_set) - || bitmap_intersect_p (merge_set, test_live) - || bitmap_intersect_p (test_set, df_get_live_in (merge_bb))) - intersect = true; -@@ -4104,10 +4104,11 @@ - unsigned i; - bitmap_iterator bi; - -- EXECUTE_IF_SET_IN_BITMAP (merge_set, 0, i, bi) -+ EXECUTE_IF_SET_IN_BITMAP (merge_set_noclobber, 0, i, bi) - remove_reg_equal_equiv_notes_for_regno (i); - - BITMAP_FREE (merge_set); -+ BITMAP_FREE (merge_set_noclobber); - } + x = delegitimize_mem_from_attrs (x); + +- if (GET_CODE (x) == LO_SUM +- && GET_CODE (XEXP (x, 1)) == UNSPEC +- && XINT (XEXP (x, 1), 1) == UNSPEC_TLSLE) +- { +- x = XVECEXP (XEXP (x, 1), 0, 0); +- gcc_assert (GET_CODE (x) == SYMBOL_REF); +- } ++ if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC) ++ switch (XINT (XEXP (x, 1), 1)) ++ { ++ case UNSPEC_MOVE_PIC: ++ case UNSPEC_TLSLE: ++ x = XVECEXP (XEXP (x, 1), 0, 0); ++ gcc_assert (GET_CODE (x) == SYMBOL_REF); ++ break; ++ default: ++ break; ++ } - reorder_insns (head, end, PREV_INSN (earliest)); -@@ -4128,7 +4129,10 @@ - cancel_changes (0); - fail: - if (merge_set) -- BITMAP_FREE (merge_set); -+ { -+ BITMAP_FREE (merge_set); -+ BITMAP_FREE (merge_set_noclobber); -+ } - return FALSE; + return x; } - -Index: gcc/BASE-VER +Index: gcc/config/i386/i386.c =================================================================== ---- gcc/BASE-VER (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/BASE-VER (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1 +1 @@ --4.5.3 -+4.5.4 -Index: gcc/df.h +--- gcc/config/i386/i386.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/i386/i386.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -32823,7 +32823,8 @@ + return ix86_cost->cond_not_taken_branch_cost; + + case vec_perm: +- return 1; ++ case vec_promote_demote: ++ return ix86_cost->vec_stmt_cost; + + default: + gcc_unreachable (); +Index: gcc/config/rs6000/vector.md =================================================================== ---- gcc/df.h (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/df.h (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -978,6 +978,7 @@ - extern void df_md_add_problem (void); - extern void df_md_simulate_artificial_defs_at_top (basic_block, bitmap); - extern void df_md_simulate_one_insn (basic_block, rtx, bitmap); -+extern void df_simulate_find_noclobber_defs (rtx, bitmap); - extern void df_simulate_find_defs (rtx, bitmap); - extern void df_simulate_defs (rtx, bitmap); - extern void df_simulate_uses (rtx, bitmap); -Index: gcc/c-typeck.c +--- gcc/config/rs6000/vector.md (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/rs6000/vector.md (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -448,6 +448,94 @@ + "VECTOR_UNIT_ALTIVEC_P (mode)" + "") + ++(define_insn_and_split "*vector_uneq" ++ [(set (match_operand:VEC_F 0 "vfloat_operand" "") ++ (uneq:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "") ++ (match_operand:VEC_F 2 "vfloat_operand" "")))] ++ "VECTOR_UNIT_ALTIVEC_OR_VSX_P (mode)" ++ "#" ++ "" ++ [(set (match_dup 3) ++ (gt:VEC_F (match_dup 1) ++ (match_dup 2))) ++ (set (match_dup 4) ++ (gt:VEC_F (match_dup 2) ++ (match_dup 1))) ++ (set (match_dup 0) ++ (not:VEC_F (ior:VEC_F (match_dup 3) ++ (match_dup 4))))] ++ " ++{ ++ operands[3] = gen_reg_rtx (mode); ++ operands[4] = gen_reg_rtx (mode); ++}") ++ ++(define_insn_and_split "*vector_ltgt" ++ [(set (match_operand:VEC_F 0 "vfloat_operand" "") ++ (ltgt:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "") ++ (match_operand:VEC_F 2 "vfloat_operand" "")))] ++ "VECTOR_UNIT_ALTIVEC_OR_VSX_P (mode)" ++ "#" ++ "" ++ [(set (match_dup 3) ++ (gt:VEC_F (match_dup 1) ++ (match_dup 2))) ++ (set (match_dup 4) ++ (gt:VEC_F (match_dup 2) ++ (match_dup 1))) ++ (set (match_dup 0) ++ (ior:VEC_F (match_dup 3) ++ (match_dup 4)))] ++ " ++{ ++ operands[3] = gen_reg_rtx (mode); ++ operands[4] = gen_reg_rtx (mode); ++}") ++ ++(define_insn_and_split "*vector_ordered" ++ [(set (match_operand:VEC_F 0 "vfloat_operand" "") ++ (ordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "") ++ (match_operand:VEC_F 2 "vfloat_operand" "")))] ++ "VECTOR_UNIT_ALTIVEC_OR_VSX_P (mode)" ++ "#" ++ "" ++ [(set (match_dup 3) ++ (ge:VEC_F (match_dup 1) ++ (match_dup 2))) ++ (set (match_dup 4) ++ (ge:VEC_F (match_dup 2) ++ (match_dup 1))) ++ (set (match_dup 0) ++ (ior:VEC_F (match_dup 3) ++ (match_dup 4)))] ++ " ++{ ++ operands[3] = gen_reg_rtx (mode); ++ operands[4] = gen_reg_rtx (mode); ++}") ++ ++(define_insn_and_split "*vector_unordered" ++ [(set (match_operand:VEC_F 0 "vfloat_operand" "") ++ (unordered:VEC_F (match_operand:VEC_F 1 "vfloat_operand" "") ++ (match_operand:VEC_F 2 "vfloat_operand" "")))] ++ "VECTOR_UNIT_ALTIVEC_OR_VSX_P (mode)" ++ "#" ++ "" ++ [(set (match_dup 3) ++ (ge:VEC_F (match_dup 1) ++ (match_dup 2))) ++ (set (match_dup 4) ++ (ge:VEC_F (match_dup 2) ++ (match_dup 1))) ++ (set (match_dup 0) ++ (not:VEC_F (ior:VEC_F (match_dup 3) ++ (match_dup 4))))] ++ " ++{ ++ operands[3] = gen_reg_rtx (mode); ++ operands[4] = gen_reg_rtx (mode); ++}") ++ + ;; Note the arguments for __builtin_altivec_vsel are op2, op1, mask + ;; which is in the reverse order that we want + (define_expand "vector_select_" +Index: gcc/config/rs6000/rs6000.c =================================================================== ---- gcc/c-typeck.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/c-typeck.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -9800,7 +9800,7 @@ - warn_for_sign_compare (location, orig_op0_folded, - orig_op1_folded, op0, op1, - result_type, resultcode); -- if (!in_late_binary_op) -+ if (!in_late_binary_op && !int_operands) - { - if (!op0_maybe_const || TREE_CODE (op0) != INTEGER_CST) - op0 = c_wrap_maybe_const (op0, !op0_maybe_const); -Index: gcc/tree-inline.c +--- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -3695,12 +3695,23 @@ + case vec_to_scalar: + case scalar_to_vec: + case cond_branch_not_taken: +- case vec_perm: + return 1; + + case cond_branch_taken: + return 3; + ++ case vec_perm: ++ if (TARGET_VSX) ++ return 4; ++ else ++ return 1; ++ ++ case vec_promote_demote: ++ if (TARGET_VSX) ++ return 5; ++ else ++ return 1; ++ + case unaligned_load: + if (TARGET_VSX && TARGET_ALLOW_MOVMISALIGN) + { +@@ -17229,6 +17240,10 @@ + case EQ: + case GT: + case GTU: ++ case ORDERED: ++ case UNORDERED: ++ case UNEQ: ++ case LTGT: + mask = gen_reg_rtx (mode); + emit_insn (gen_rtx_SET (VOIDmode, + mask, +Index: gcc/config/rs6000/vsx.md =================================================================== ---- gcc/tree-inline.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/tree-inline.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -4179,14 +4179,16 @@ - CONSTRUCTOR_ELTS (*tp)); - *tp = new_tree; - } -+ else if (code == STATEMENT_LIST) -+ /* We used to just abort on STATEMENT_LIST, but we can run into them -+ with statement-expressions (c++/40975). */ -+ copy_statement_list (tp); - else if (TREE_CODE_CLASS (code) == tcc_type) - *walk_subtrees = 0; - else if (TREE_CODE_CLASS (code) == tcc_declaration) - *walk_subtrees = 0; - else if (TREE_CODE_CLASS (code) == tcc_constant) - *walk_subtrees = 0; -- else -- gcc_assert (code != STATEMENT_LIST); - return NULL_TREE; +--- gcc/config/rs6000/vsx.md (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/rs6000/vsx.md (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1006,9 +1006,9 @@ + "VECTOR_MEM_VSX_P (mode)" + { + if (INTVAL (operands[3]) == 0) +- return \"xxpermdi %x0,%x1,%x2,1\"; ++ return \"xxpermdi %x0,%x2,%x1,1\"; + else if (INTVAL (operands[3]) == 1) +- return \"xxpermdi %x0,%x2,%x1,0\"; ++ return \"xxpermdi %x0,%x1,%x2,0\"; + else + gcc_unreachable (); } - -Index: gcc/var-tracking.c +Index: gcc/config/pa/predicates.md =================================================================== ---- gcc/var-tracking.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/var-tracking.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -4134,8 +4134,9 @@ - VALUE_RECURSED_INTO (val) = true; - - for (node = var->var_part[0].loc_chain; node; node = node->next) -- if (MEM_P (node->loc) && MEM_EXPR (node->loc) == expr -- && MEM_OFFSET (node->loc) == 0) -+ if (MEM_P (node->loc) -+ && MEM_EXPR (node->loc) == expr -+ && INT_MEM_OFFSET (node->loc) == 0) - { - where = node; - break; -@@ -4198,11 +4199,10 @@ - { - for (loc = var->var_part[0].loc_chain; loc; loc = loc->next) - { -- /* We want to remove dying MEMs that doesn't refer to -- DECL. */ -+ /* We want to remove dying MEMs that doesn't refer to DECL. */ - if (GET_CODE (loc->loc) == MEM - && (MEM_EXPR (loc->loc) != decl -- || MEM_OFFSET (loc->loc)) -+ || INT_MEM_OFFSET (loc->loc) != 0) - && !mem_dies_at_call (loc->loc)) - break; - /* We want to move here MEMs that do refer to DECL. */ -@@ -4246,7 +4246,7 @@ - - if (GET_CODE (loc->loc) != MEM - || (MEM_EXPR (loc->loc) == decl -- && MEM_OFFSET (loc->loc) == 0) -+ && INT_MEM_OFFSET (loc->loc) == 0) - || !mem_dies_at_call (loc->loc)) - { - if (old_loc != loc->loc && emit_notes) -Index: gcc/df-problems.c +--- gcc/config/pa/predicates.md (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/pa/predicates.md (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -421,9 +421,9 @@ + (ior (match_operand 0 "register_operand") + (match_operand 0 "cint_ior_operand"))) + +-;; True iff OP is a CONST_INT of the forms 0...0xxxx or +-;; 0...01...1xxxx. Such values can be the left hand side x in (x << +-;; r), using the zvdepi instruction. ++;; True iff OP is a CONST_INT of the forms 0...0xxxx, 0...01...1xxxx, ++;; or 1...1xxxx. Such values can be the left hand side x in (x << r), ++;; using the zvdepi instruction. + + (define_predicate "lhs_lshift_cint_operand" + (match_code "const_int") +Index: gcc/config/pa/pa.md =================================================================== ---- gcc/df-problems.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/df-problems.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -3748,9 +3748,22 @@ - for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) - { - df_ref def = *def_rec; -- /* If the def is to only part of the reg, it does -- not kill the other defs that reach here. */ -- if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))) -+ bitmap_set_bit (defs, DF_REF_REGNO (def)); -+ } -+} -+ -+/* Find the set of real DEFs, which are not clobbers, for INSN. */ -+ -+void -+df_simulate_find_noclobber_defs (rtx insn, bitmap defs) +--- gcc/config/pa/pa.md (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/pa/pa.md (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -6348,7 +6348,7 @@ + "" + "* + { +- int x = INTVAL (operands[1]); ++ unsigned HOST_WIDE_INT x = UINTVAL (operands[1]); + operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1)); + operands[1] = GEN_INT ((x & 0xf) - 0x10); + return \"{zvdepi %1,%2,%0|depwi,z %1,%%sar,%2,%0}\"; +@@ -6366,7 +6366,7 @@ + "exact_log2 (INTVAL (operands[1]) + 1) > 0" + "* + { +- int x = INTVAL (operands[1]); ++ HOST_WIDE_INT x = INTVAL (operands[1]); + operands[2] = GEN_INT (exact_log2 (x + 1)); + return \"{vdepi -1,%2,%0|depwi -1,%%sar,%2,%0}\"; + }" +@@ -6383,7 +6383,7 @@ + "INTVAL (operands[1]) == -2" + "* + { +- int x = INTVAL (operands[1]); ++ HOST_WIDE_INT x = INTVAL (operands[1]); + operands[2] = GEN_INT (exact_log2 ((~x) + 1)); + return \"{vdepi 0,%2,%0|depwi 0,%%sar,%2,%0}\"; + }" +@@ -6447,7 +6447,7 @@ + "TARGET_64BIT" + "* + { +- int x = INTVAL (operands[1]); ++ unsigned HOST_WIDE_INT x = UINTVAL (operands[1]); + operands[2] = GEN_INT (4 + exact_log2 ((x >> 4) + 1)); + operands[1] = GEN_INT ((x & 0x1f) - 0x20); + return \"depdi,z %1,%%sar,%2,%0\"; +@@ -6465,7 +6465,7 @@ + "TARGET_64BIT && exact_log2 (INTVAL (operands[1]) + 1) > 0" + "* + { +- int x = INTVAL (operands[1]); ++ HOST_WIDE_INT x = INTVAL (operands[1]); + operands[2] = GEN_INT (exact_log2 (x + 1)); + return \"depdi -1,%%sar,%2,%0\"; + }" +@@ -6482,7 +6482,7 @@ + "TARGET_64BIT && INTVAL (operands[1]) == -2" + "* + { +- int x = INTVAL (operands[1]); ++ HOST_WIDE_INT x = INTVAL (operands[1]); + operands[2] = GEN_INT (exact_log2 ((~x) + 1)); + return \"depdi 0,%%sar,%2,%0\"; + }" +@@ -6671,6 +6671,20 @@ + + ;; Unconditional and other jump instructions. + ++;; Trivial return used when no epilogue is needed. ++(define_insn "return" ++ [(return) ++ (use (reg:SI 2))] ++ "pa_can_use_return_insn ()" ++ "* +{ -+ df_ref *def_rec; -+ unsigned int uid = INSN_UID (insn); -+ -+ for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) -+ { -+ df_ref def = *def_rec; -+ if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER))) - bitmap_set_bit (defs, DF_REF_REGNO (def)); - } - } -@@ -3903,13 +3916,9 @@ - the block, starting with the first one. - ----------------------------------------------------------------------------*/ - --/* Apply the artificial uses and defs at the top of BB in a forwards -- direction. ??? This is wrong; defs mark the point where a pseudo -- becomes live when scanning forwards (unless a def is unused). Since -- there are no REG_UNUSED notes for artificial defs, passes that -- require artificial defs probably should not call this function -- unless (as is the case for fwprop) they are correct when liveness -- bitmaps are *under*estimated. */ -+/* Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or -+ DF_LR_IN for basic block BB, for forward scanning by marking artificial -+ defs live. */ - - void - df_simulate_initialize_forwards (basic_block bb, bitmap live) -@@ -3921,7 +3930,7 @@ ++ if (TARGET_PA_20) ++ return \"bve%* (%%r2)\"; ++ return \"bv%* %%r0(%%r2)\"; ++}" ++ [(set_attr "type" "branch") ++ (set_attr "length" "4")]) ++ + ;; This is used for most returns. + (define_insn "return_internal" + [(return) +@@ -6719,11 +6733,8 @@ + rtx x; + + /* Try to use the trivial return first. Else use the full epilogue. */ +- if (reload_completed +- && !frame_pointer_needed +- && !df_regs_ever_live_p (2) +- && (compute_frame_size (get_frame_size (), 0) ? 0 : 1)) +- x = gen_return_internal (); ++ if (pa_can_use_return_insn ()) ++ x = gen_return (); + else { - df_ref def = *def_rec; - if (DF_REF_FLAGS (def) & DF_REF_AT_TOP) -- bitmap_clear_bit (live, DF_REF_REGNO (def)); -+ bitmap_set_bit (live, DF_REF_REGNO (def)); + hppa_expand_epilogue (); +Index: gcc/config/pa/pa-protos.h +=================================================================== +--- gcc/config/pa/pa-protos.h (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/pa/pa-protos.h (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -136,6 +136,7 @@ + extern int cint_ok_for_move (HOST_WIDE_INT); + extern void hppa_expand_prologue (void); + extern void hppa_expand_epilogue (void); ++extern bool pa_can_use_return_insn (void); + extern int ior_mask_p (unsigned HOST_WIDE_INT); + extern void compute_zdepdi_operands (unsigned HOST_WIDE_INT, + unsigned *); +Index: gcc/config/pa/pa.c +=================================================================== +--- gcc/config/pa/pa.c (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ gcc/config/pa/pa.c (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -4442,6 +4442,24 @@ } } -@@ -3942,7 +3951,7 @@ - while here the scan is performed forwards! So, first assume that the - def is live, and if this is not true REG_UNUSED notes will rectify the - situation. */ -- df_simulate_find_defs (insn, live); -+ df_simulate_find_noclobber_defs (insn, live); - - /* Clear all of the registers that go dead. */ - for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) -Index: gcc/tree-switch-conversion.c -=================================================================== ---- gcc/tree-switch-conversion.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/tree-switch-conversion.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -549,7 +549,7 @@ - build_arrays (gimple swtch) ++bool ++pa_can_use_return_insn (void) ++{ ++ if (!reload_completed) ++ return false; ++ ++ if (frame_pointer_needed) ++ return false; ++ ++ if (df_regs_ever_live_p (2)) ++ return false; ++ ++ if (crtl->profile) ++ return false; ++ ++ return compute_frame_size (get_frame_size (), 0) == 0; ++} ++ + rtx + hppa_pic_save_rtx (void) { - tree arr_index_type; -- tree tidx, sub, tmp; -+ tree tidx, sub, tmp, utype; - gimple stmt; - gimple_stmt_iterator gsi; - int i; -@@ -557,14 +557,20 @@ - - gsi = gsi_for_stmt (swtch); - -+ /* Make sure we do not generate arithmetics in a subrange. */ -+ utype = TREE_TYPE (info.index_expr); -+ if (TREE_TYPE (utype)) -+ utype = lang_hooks.types.type_for_mode (TYPE_MODE (TREE_TYPE (utype)), 1); -+ else -+ utype = lang_hooks.types.type_for_mode (TYPE_MODE (utype), 1); -+ - arr_index_type = build_index_type (info.range_size); -- tmp = create_tmp_var (TREE_TYPE (info.index_expr), "csti"); -+ tmp = create_tmp_var (utype, "csui"); - add_referenced_var (tmp); - tidx = make_ssa_name (tmp, NULL); -- sub = fold_build2_loc (loc, MINUS_EXPR, -- TREE_TYPE (info.index_expr), info.index_expr, -- fold_convert_loc (loc, TREE_TYPE (info.index_expr), -- info.range_min)); -+ sub = fold_build2_loc (loc, MINUS_EXPR, utype, -+ fold_convert_loc (loc, utype, info.index_expr), -+ fold_convert_loc (loc, utype, info.range_min)); - sub = force_gimple_operand_gsi (&gsi, sub, - false, NULL, true, GSI_SAME_STMT); - stmt = gimple_build_assign (tidx, sub); -@@ -673,12 +679,7 @@ - tree label_decl2 = create_artificial_label (UNKNOWN_LOCATION); - tree label_decl3 = create_artificial_label (UNKNOWN_LOCATION); - gimple label1, label2, label3; -- -- tree utype; -- tree tmp_u_1, tmp_u_2, tmp_u_var; -- tree cast; -- gimple cast_assign, minus_assign; -- tree ulb, minus; -+ tree utype, tidx; - tree bound; - - gimple cond_stmt; -@@ -692,49 +693,24 @@ - gcc_assert (info.default_values); - bb0 = gimple_bb (swtch); - -- /* Make sure we do not generate arithmetics in a subrange. */ -- if (TREE_TYPE (TREE_TYPE (info.index_expr))) -- utype = lang_hooks.types.type_for_mode -- (TYPE_MODE (TREE_TYPE (TREE_TYPE (info.index_expr))), 1); -- else -- utype = lang_hooks.types.type_for_mode -- (TYPE_MODE (TREE_TYPE (info.index_expr)), 1); -+ tidx = gimple_assign_lhs (info.arr_ref_first); -+ utype = TREE_TYPE (tidx); - - /* (end of) block 0 */ - gsi = gsi_for_stmt (info.arr_ref_first); -- tmp_u_var = create_tmp_var (utype, "csui"); -- add_referenced_var (tmp_u_var); -- tmp_u_1 = make_ssa_name (tmp_u_var, NULL); -+ gsi_next (&gsi); - -- cast = fold_convert_loc (loc, utype, info.index_expr); -- cast_assign = gimple_build_assign (tmp_u_1, cast); -- SSA_NAME_DEF_STMT (tmp_u_1) = cast_assign; -- gsi_insert_before (&gsi, cast_assign, GSI_SAME_STMT); -- update_stmt (cast_assign); -- -- ulb = fold_convert_loc (loc, utype, info.range_min); -- minus = fold_build2_loc (loc, MINUS_EXPR, utype, tmp_u_1, ulb); -- minus = force_gimple_operand_gsi (&gsi, minus, false, NULL, true, -- GSI_SAME_STMT); -- tmp_u_2 = make_ssa_name (tmp_u_var, NULL); -- minus_assign = gimple_build_assign (tmp_u_2, minus); -- SSA_NAME_DEF_STMT (tmp_u_2) = minus_assign; -- gsi_insert_before (&gsi, minus_assign, GSI_SAME_STMT); -- update_stmt (minus_assign); -- - bound = fold_convert_loc (loc, utype, info.range_size); -- cond_stmt = gimple_build_cond (LE_EXPR, tmp_u_2, bound, NULL_TREE, NULL_TREE); -+ cond_stmt = gimple_build_cond (LE_EXPR, tidx, bound, NULL_TREE, NULL_TREE); - gsi_insert_before (&gsi, cond_stmt, GSI_SAME_STMT); - update_stmt (cond_stmt); - - /* block 2 */ -- gsi = gsi_for_stmt (info.arr_ref_first); - label2 = gimple_build_label (label_decl2); - gsi_insert_before (&gsi, label2, GSI_SAME_STMT); - last_assign = gen_def_assigns (&gsi); - - /* block 1 */ -- gsi = gsi_for_stmt (info.arr_ref_first); - label1 = gimple_build_label (label_decl1); - gsi_insert_before (&gsi, label1, GSI_SAME_STMT); +@@ -4586,7 +4604,7 @@ + rtx saved_rp; + rtx ins; -Index: gcc/config/i386/i386.md -=================================================================== ---- gcc/config/i386/i386.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/i386.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -2430,7 +2430,7 @@ - [(set_attr "type" "*,*,mmx,mmxmov,mmxmov,sselog1,ssemov,ssemov,ssemov,sselog1,ssemov,ssemov,ssemov") - (set (attr "prefix") - (if_then_else (eq_attr "alternative" "5,6,7,8") -- (const_string "vex") -+ (const_string "maybe_vex") - (const_string "orig"))) - (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI,TI,DI,V4SF,V2SF,V4SF,V2SF")]) - -@@ -2468,21 +2468,15 @@ - return "movdq2q\t{%1, %0|%0, %1}"; +- /* Instruction stream at the normal return address for the export stub: ++ /* The instruction stream at the return address of a PA1.X export stub is: - case TYPE_SSEMOV: -- if (TARGET_AVX) -- { -- if (get_attr_mode (insn) == MODE_TI) -- return "vmovdqa\t{%1, %0|%0, %1}"; -- else -- return "vmovq\t{%1, %0|%0, %1}"; -- } -- - if (get_attr_mode (insn) == MODE_TI) -- return "movdqa\t{%1, %0|%0, %1}"; -- /* FALLTHRU */ -+ return "%vmovdqa\t{%1, %0|%0, %1}"; -+ /* Handle broken assemblers that require movd instead of movq. */ -+ if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) -+ return "%vmovd\t{%1, %0|%0, %1}"; -+ return "%vmovq\t{%1, %0|%0, %1}"; + 0x4bc23fd1 | stub+8: ldw -18(sr0,sp),rp + 0x004010a1 | stub+12: ldsid (sr0,rp),r1 +@@ -4594,11 +4612,17 @@ + 0xe0400002 | stub+20: be,n 0(sr0,rp) - case TYPE_MMXMOV: -- /* Moves from and into integer register is done using movd -- opcode with REX prefix. */ -+ /* Handle broken assemblers that require movd instead of movq. */ - if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) - return "movd\t{%1, %0|%0, %1}"; - return "movq\t{%1, %0|%0, %1}"; -@@ -2915,12 +2909,13 @@ + 0xe0400002 must be specified as -532676606 so that it won't be +- rejected as an invalid immediate operand on 64-bit hosts. */ ++ rejected as an invalid immediate operand on 64-bit hosts. - case 9: case 10: case 14: case 15: - return "movd\t{%1, %0|%0, %1}"; -- case 12: case 13: -- return "%vmovd\t{%1, %0|%0, %1}"; +- HOST_WIDE_INT insns[4] = {0x4bc23fd1, 0x004010a1, 0x00011820, -532676606}; +- int i; ++ The instruction stream at the return address of a PA2.0 export stub is: - case 11: - return "movq\t{%1, %0|%0, %1}"; - -+ case 12: case 13: -+ return "%vmovd\t{%1, %0|%0, %1}"; ++ 0x4bc23fd1 | stub+8: ldw -18(sr0,sp),rp ++ 0xe840d002 | stub+12: bve,n (rp) ++ */ + - default: - gcc_unreachable (); - } -@@ -3067,6 +3062,7 @@ - case 3: - case 4: - return "#"; ++ HOST_WIDE_INT insns[4]; ++ int i, len; + - case 5: - switch (get_attr_mode (insn)) - { -@@ -3262,7 +3258,8 @@ - - case 9: - case 10: -- return "%vmovd\t{%1, %0|%0, %1}"; -+ /* Handle broken assemblers that require movd instead of movq. */ -+ return "%vmovd\t{%1, %0|%0, %1}"; - - default: - gcc_unreachable(); -@@ -3361,11 +3358,11 @@ - switch (get_attr_mode (insn)) - { - case MODE_V4SF: -- return "xorps\t%0, %0"; -+ return "%vxorps\t%0, %d0"; - case MODE_V2DF: -- return "xorpd\t%0, %0"; -+ return "%vxorpd\t%0, %d0"; - case MODE_TI: -- return "pxor\t%0, %0"; -+ return "%vpxor\t%0, %d0"; - default: - gcc_unreachable (); - } -@@ -3375,28 +3372,56 @@ - switch (get_attr_mode (insn)) - { - case MODE_V4SF: -- return "movaps\t{%1, %0|%0, %1}"; -+ return "%vmovaps\t{%1, %0|%0, %1}"; - case MODE_V2DF: -- return "movapd\t{%1, %0|%0, %1}"; -+ return "%vmovapd\t{%1, %0|%0, %1}"; - case MODE_TI: -- return "movdqa\t{%1, %0|%0, %1}"; -+ return "%vmovdqa\t{%1, %0|%0, %1}"; - case MODE_DI: -- return "movq\t{%1, %0|%0, %1}"; -+ return "%vmovq\t{%1, %0|%0, %1}"; - case MODE_DF: -- return "movsd\t{%1, %0|%0, %1}"; -+ if (TARGET_AVX) -+ { -+ if (REG_P (operands[0]) && REG_P (operands[1])) -+ return "vmovsd\t{%1, %0, %0|%0, %0, %1}"; -+ else -+ return "vmovsd\t{%1, %0|%0, %1}"; -+ } -+ else -+ return "movsd\t{%1, %0|%0, %1}"; - case MODE_V1DF: -- return "movlpd\t{%1, %0|%0, %1}"; -+ if (TARGET_AVX) -+ { -+ if (REG_P (operands[0])) -+ return "vmovlpd\t{%1, %0, %0|%0, %0, %1}"; -+ else -+ return "vmovlpd\t{%1, %0|%0, %1}"; -+ } -+ else -+ return "movlpd\t{%1, %0|%0, %1}"; - case MODE_V2SF: -- return "movlps\t{%1, %0|%0, %1}"; -+ if (TARGET_AVX) -+ { -+ if (REG_P (operands[0])) -+ return "vmovlps\t{%1, %0, %0|%0, %0, %1}"; -+ else -+ return "vmovlps\t{%1, %0|%0, %1}"; -+ } -+ else -+ return "movlps\t{%1, %0|%0, %1}"; - default: - gcc_unreachable (); - } + if (count != 0) + return NULL_RTX; - default: -- gcc_unreachable(); -+ gcc_unreachable (); - } - } - [(set_attr "type" "fmov,fmov,fmov,multi,multi,sselog1,ssemov,ssemov,ssemov") -+ (set (attr "prefix") -+ (if_then_else (eq_attr "alternative" "0,1,2,3,4") -+ (const_string "orig") -+ (const_string "maybe_vex"))) - (set (attr "prefix_data16") - (if_then_else (eq_attr "mode" "V1DF") - (const_string "1") -Index: gcc/config/i386/mmx.md -=================================================================== ---- gcc/config/i386/mmx.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/mmx.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -63,6 +63,7 @@ - DONE; - }) +@@ -4620,11 +4644,26 @@ + ins = copy_to_reg (gen_rtx_AND (Pmode, rp, MASK_RETURN_ADDR)); + label = gen_label_rtx (); -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*mov_internal_rex64" - [(set (match_operand:MMXMODEI8 0 "nonimmediate_operand" - "=rm,r,!?y,!?y ,m ,!y,*Y2,x,x ,m,r,Yi") -@@ -81,8 +82,8 @@ - %vpxor\t%0, %d0 - %vmovq\t{%1, %0|%0, %1} - %vmovq\t{%1, %0|%0, %1} -- %vmovq\t{%1, %0|%0, %1} -- %vmovq\t{%1, %0|%0, %1}" -+ %vmovd\t{%1, %0|%0, %1} -+ %vmovd\t{%1, %0|%0, %1}" - [(set_attr "type" "imov,imov,mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,ssemov,ssemov") - (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*") - (set_attr "prefix_rep" "*,*,*,*,*,1,1,*,1,*,*,*") -@@ -192,6 +193,7 @@ - (const_string "orig"))) - (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) ++ if (TARGET_PA_20) ++ { ++ insns[0] = 0x4bc23fd1; ++ insns[1] = -398405630; ++ len = 2; ++ } ++ else ++ { ++ insns[0] = 0x4bc23fd1; ++ insns[1] = 0x004010a1; ++ insns[2] = 0x00011820; ++ insns[3] = -532676606; ++ len = 4; ++ } ++ + /* Check the instruction stream at the normal return address for the + export stub. If it is an export stub, than our return address is + really in -24[frameaddr]. */ -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*movv2sf_internal_rex64" - [(set (match_operand:V2SF 0 "nonimmediate_operand" - "=rm,r ,!?y,!?y ,m ,!y,*Y2,x,x,x,m,r,Yi") -Index: gcc/config/i386/sse.md +- for (i = 0; i < 3; i++) ++ for (i = 0; i < len; i++) + { + rtx op0 = gen_rtx_MEM (SImode, plus_constant (ins, i * 4)); + rtx op1 = GEN_INT (insns[i]); +Index: libstdc++-v3/include/debug/safe_iterator.h =================================================================== ---- gcc/config/i386/sse.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/sse.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -7473,9 +7473,8 @@ - "@ - # - # -- %vmov{q}\t{%1, %0|%0, %1}" -+ mov{q}\t{%1, %0|%0, %1}" - [(set_attr "type" "*,*,imov") -- (set_attr "prefix" "*,*,maybe_vex") - (set_attr "mode" "*,*,DI")]) - - (define_insn "*sse2_storeq" -@@ -7513,11 +7512,11 @@ - vmovhps\t{%1, %0|%0, %1} - vpsrldq\t{$8, %1, %0|%0, %1, 8} - vmovq\t{%H1, %0|%0, %H1} -- vmov{q}\t{%H1, %0|%0, %H1}" -+ mov{q}\t{%H1, %0|%0, %H1}" - [(set_attr "type" "ssemov,sseishft1,ssemov,imov") - (set_attr "length_immediate" "*,1,*,*") - (set_attr "memory" "*,none,*,*") -- (set_attr "prefix" "vex") -+ (set_attr "prefix" "vex,vex,vex,orig") - (set_attr "mode" "V2SF,TI,TI,DI")]) - - (define_insn "*vec_extractv2di_1_rex64" -@@ -7795,6 +7794,7 @@ - (const_string "vex"))) - (set_attr "mode" "TI,TI,TI,TI,TI,V2SF")]) - -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*vec_concatv2di_rex64_sse4_1" - [(set (match_operand:V2DI 0 "register_operand" "=x ,x ,Yi,!x,x,x,x") - (vec_concat:V2DI -@@ -7804,7 +7804,7 @@ - "@ - pinsrq\t{$0x1, %2, %0|%0, %2, 0x1} - movq\t{%1, %0|%0, %1} -- movq\t{%1, %0|%0, %1} -+ movd\t{%1, %0|%0, %1} - movq2dq\t{%1, %0|%0, %1} - punpcklqdq\t{%2, %0|%0, %2} - movlhps\t{%2, %0|%0, %2} -@@ -7815,6 +7815,7 @@ - (set_attr "length_immediate" "1,*,*,*,*,*,*") - (set_attr "mode" "TI,TI,TI,TI,TI,V4SF,V2SF")]) +--- libstdc++-v3/include/debug/safe_iterator.h (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ libstdc++-v3/include/debug/safe_iterator.h (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,6 +1,6 @@ + // Safe iterator implementation -*- C++ -*- + +-// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011 ++// Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010, 2011, 2012 + // Free Software Foundation, Inc. + // + // This file is part of the GNU ISO C++ Library. This library is free +@@ -142,7 +142,25 @@ + ._M_iterator(__x, "other")); + } + ++#ifdef __GXX_EXPERIMENTAL_CXX0X__ + /** ++ * @brief Move construction. ++ * @post __x is singular and unattached ++ */ ++ _Safe_iterator(_Safe_iterator&& __x) : _M_current() ++ { ++ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular() ++ || __x._M_current == _Iterator(), ++ _M_message(__msg_init_copy_singular) ++ ._M_iterator(*this, "this") ++ ._M_iterator(__x, "other")); ++ std::swap(_M_current, __x._M_current); ++ this->_M_attach(__x._M_sequence); ++ __x._M_detach(); ++ } ++#endif ++ ++ /** + * @brief Converting constructor from a mutable iterator to a + * constant iterator. + */ +@@ -181,7 +199,28 @@ + return *this; + } + ++#ifdef __GXX_EXPERIMENTAL_CXX0X__ + /** ++ * @brief Move assignment. ++ * @post __x is singular and unattached ++ */ ++ _Safe_iterator& ++ operator=(_Safe_iterator&& __x) ++ { ++ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular() ++ || __x._M_current == _Iterator(), ++ _M_message(__msg_copy_singular) ++ ._M_iterator(*this, "this") ++ ._M_iterator(__x, "other")); ++ _M_current = __x._M_current; ++ _M_attach(__x._M_sequence); ++ __x._M_detach(); ++ __x._M_current = _Iterator(); ++ return *this; ++ } ++#endif ++ ++ /** + * @brief Iterator dereference. + * @pre iterator is dereferenceable + */ +@@ -415,7 +454,9 @@ + /// Is this iterator equal to the sequence's before_begin() iterator if + /// any? + bool _M_is_before_begin() const +- { return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); } ++ { ++ return _BeforeBeginHelper<_Sequence>::_M_Is(base(), _M_get_sequence()); ++ } + }; -+;; movd instead of movq is required to handle broken assemblers. - (define_insn "*vec_concatv2di_rex64_sse" - [(set (match_operand:V2DI 0 "register_operand" "=Y2 ,Yi,!Y2,Y2,x,x") - (vec_concat:V2DI -@@ -7823,7 +7824,7 @@ - "TARGET_64BIT && TARGET_SSE" - "@ - movq\t{%1, %0|%0, %1} -- movq\t{%1, %0|%0, %1} -+ movd\t{%1, %0|%0, %1} - movq2dq\t{%1, %0|%0, %1} - punpcklqdq\t{%2, %0|%0, %2} - movlhps\t{%2, %0|%0, %2} -Index: gcc/config/i386/i386.c + template +Index: libstdc++-v3/ChangeLog =================================================================== ---- gcc/config/i386/i386.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/i386/i386.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -14610,11 +14610,15 @@ - if (req_mode == CCZmode) - return 0; - /* FALLTHRU */ -+ case CCZmode: -+ break; -+ - case CCAmode: - case CCCmode: - case CCOmode: - case CCSmode: -- case CCZmode: -+ if (set_mode != req_mode) -+ return 0; - break; - - default: -@@ -27711,10 +27715,19 @@ - break; - - case V2DImode: -- use_vec_merge = TARGET_SSE4_1; -+ use_vec_merge = TARGET_SSE4_1 && TARGET_64BIT; - if (use_vec_merge) - break; +--- libstdc++-v3/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ libstdc++-v3/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,10 @@ ++2012-03-08 Jonathan Wakely ++ ++ PR libstdc++/52433 ++ * include/debug/safe_iterator.h (_Safe_iterator): Add move ++ constructor and move assignment operator. ++ * testsuite/23_containers/vector/debug/52433.cc: New. ++ + 2012-03-01 Release Manager -+ tmp = gen_reg_rtx (GET_MODE_INNER (mode)); -+ ix86_expand_vector_extract (false, tmp, target, 1 - elt); -+ if (elt == 0) -+ tmp = gen_rtx_VEC_CONCAT (mode, tmp, val); -+ else -+ tmp = gen_rtx_VEC_CONCAT (mode, val, tmp); -+ emit_insn (gen_rtx_SET (VOIDmode, target, tmp)); -+ return; -+ - case V2DFmode: - { - rtx op0, op1; -Index: gcc/config/rs6000/rs6000.c + * GCC 4.6.3 released. +Index: libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc =================================================================== ---- gcc/config/rs6000/rs6000.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/rs6000/rs6000.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -5426,10 +5426,11 @@ - - if (model == TLS_MODEL_GLOBAL_DYNAMIC) - { -- r3 = gen_rtx_REG (Pmode, 3); - tga = rs6000_tls_get_addr (); -- emit_library_call_value (tga, dest, LCT_CONST, Pmode, 1, r3, Pmode); -+ emit_library_call_value (tga, dest, LCT_CONST, Pmode, -+ 1, const0_rtx, Pmode); - -+ r3 = gen_rtx_REG (Pmode, 3); - if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT) - insn = gen_tls_gd_aix64 (r3, got, addr, tga, const0_rtx); - else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT) -@@ -5446,11 +5447,12 @@ - } - else if (model == TLS_MODEL_LOCAL_DYNAMIC) - { -- r3 = gen_rtx_REG (Pmode, 3); - tga = rs6000_tls_get_addr (); - tmp1 = gen_reg_rtx (Pmode); -- emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, 1, r3, Pmode); -+ emit_library_call_value (tga, tmp1, LCT_CONST, Pmode, -+ 1, const0_rtx, Pmode); - -+ r3 = gen_rtx_REG (Pmode, 3); - if (DEFAULT_ABI == ABI_AIX && TARGET_64BIT) - insn = gen_tls_ld_aix64 (r3, got, tga, const0_rtx); - else if (DEFAULT_ABI == ABI_AIX && !TARGET_64BIT) -@@ -6694,7 +6696,7 @@ - - /* Nonzero if we can use an AltiVec register to pass this arg. */ - #define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED) \ -- ((ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE)) \ -+ (ALTIVEC_OR_VSX_VECTOR_MODE (MODE) \ - && (CUM)->vregno <= ALTIVEC_ARG_MAX_REG \ - && TARGET_ALTIVEC_ABI \ - && (NAMED)) -@@ -6920,7 +6922,7 @@ - existing library interfaces. - - Doubleword align SPE vectors. -- Quadword align Altivec vectors. -+ Quadword align Altivec/VSX vectors. - Quadword align large synthetic vector types. */ - - int -@@ -6937,7 +6939,7 @@ - && int_size_in_bytes (type) >= 8 - && int_size_in_bytes (type) < 16)) - return 64; -- else if ((ALTIVEC_VECTOR_MODE (mode) || VSX_VECTOR_MODE (mode)) -+ else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - || (type && TREE_CODE (type) == VECTOR_TYPE - && int_size_in_bytes (type) >= 16)) - return 128; -@@ -7082,8 +7084,7 @@ - cum->nargs_prototype--; - - if (TARGET_ALTIVEC_ABI -- && (ALTIVEC_VECTOR_MODE (mode) -- || VSX_VECTOR_MODE (mode) -+ && (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - || (type && TREE_CODE (type) == VECTOR_TYPE - && int_size_in_bytes (type) == 16))) - { -@@ -7677,8 +7678,7 @@ - else - return gen_rtx_REG (mode, cum->vregno); - else if (TARGET_ALTIVEC_ABI -- && (ALTIVEC_VECTOR_MODE (mode) -- || VSX_VECTOR_MODE (mode) -+ && (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - || (type && TREE_CODE (type) == VECTOR_TYPE - && int_size_in_bytes (type) == 16))) - { -@@ -18280,7 +18280,7 @@ - - /* Some cases that need register indexed addressing. */ - if ((TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode)) -- || (TARGET_VSX && VSX_VECTOR_MODE (mode)) -+ || (TARGET_VSX && ALTIVEC_OR_VSX_VECTOR_MODE (mode)) - || (TARGET_E500_DOUBLE && mode == DFmode) - || (TARGET_SPE_ABI - && SPE_VECTOR_MODE (mode) -@@ -25565,14 +25565,13 @@ - else if (TREE_CODE (valtype) == COMPLEX_TYPE - && targetm.calls.split_complex_arg) - return rs6000_complex_function_value (mode); -+ /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same -+ return register is used in both cases, and we won't see V2DImode/V2DFmode -+ for pure altivec, combine the two cases. */ - else if (TREE_CODE (valtype) == VECTOR_TYPE - && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI -- && ALTIVEC_VECTOR_MODE (mode)) -+ && ALTIVEC_OR_VSX_VECTOR_MODE (mode)) - regno = ALTIVEC_ARG_RETURN; -- else if (TREE_CODE (valtype) == VECTOR_TYPE -- && TARGET_VSX && TARGET_ALTIVEC_ABI -- && VSX_VECTOR_MODE (mode)) -- regno = ALTIVEC_ARG_RETURN; - else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT - && (mode == DFmode || mode == DCmode - || mode == TFmode || mode == TCmode)) -@@ -25611,12 +25610,12 @@ - && TARGET_HARD_FLOAT && TARGET_FPRS - && ((TARGET_SINGLE_FLOAT && mode == SFmode) || TARGET_DOUBLE_FLOAT)) - regno = FP_ARG_RETURN; -- else if (ALTIVEC_VECTOR_MODE (mode) -+ /* VSX is a superset of Altivec and adds V2DImode/V2DFmode. Since the same -+ return register is used in both cases, and we won't see V2DImode/V2DFmode -+ for pure altivec, combine the two cases. */ -+ else if (ALTIVEC_OR_VSX_VECTOR_MODE (mode) - && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI) - regno = ALTIVEC_ARG_RETURN; -- else if (VSX_VECTOR_MODE (mode) -- && TARGET_VSX && TARGET_ALTIVEC_ABI) -- regno = ALTIVEC_ARG_RETURN; - else if (COMPLEX_MODE_P (mode) && targetm.calls.split_complex_arg) - return rs6000_complex_function_value (mode); - else if (TARGET_E500_DOUBLE && TARGET_HARD_FLOAT - -Zmiany atrybutów dla: gcc/config/rs6000/rs6000.c -___________________________________________________________________ -Dodane: svn:mergeinfo - Połączono zmiany /trunk/gcc/config/rs6000/rs6000.c:r162404,173624 - -Index: gcc/config/rs6000/rs6000.h +--- libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc (.../tags/gcc_4_6_3_release) (wersja 0) ++++ libstdc++-v3/testsuite/23_containers/vector/debug/52433.cc (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -0,0 +1,43 @@ ++// Copyright (C) 2012 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++// ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++// ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++// ++// { dg-require-debug-mode "" } ++// { dg-options "-std=gnu++0x" } ++// { dg-do compile } ++ ++// PR libstdc++/52433 ++ ++#include ++ ++struct X ++{ ++ std::vector::iterator i; ++ ++ X() = default; ++ X(const X&) = default; ++ X(X&&) = default; ++ X& operator=(const X&) = default; ++ X& operator=(X&&) = default; ++}; ++ ++X test01() ++{ ++ X x; ++ x = X(); ++ return x; ++} ++ +Index: boehm-gc/configure.ac =================================================================== ---- gcc/config/rs6000/rs6000.h (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/rs6000/rs6000.h (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1038,10 +1038,9 @@ - - /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate - enough space to account for vectors in FP regs. */ --#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ -- (TARGET_VSX \ -- && ((MODE) == VOIDmode || VSX_VECTOR_MODE (MODE) \ -- || ALTIVEC_VECTOR_MODE (MODE)) \ -+#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ -+ (TARGET_VSX \ -+ && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \ - && FP_REGNO_P (REGNO) \ - ? V2DFmode \ - : choose_hard_reg_mode ((REGNO), (NREGS), false)) -@@ -1057,25 +1056,16 @@ - ((MODE) == V4SFmode \ - || (MODE) == V2DFmode) \ - --#define VSX_SCALAR_MODE(MODE) \ -- ((MODE) == DFmode) -- --#define VSX_MODE(MODE) \ -- (VSX_VECTOR_MODE (MODE) \ -- || VSX_SCALAR_MODE (MODE)) -- --#define VSX_MOVE_MODE(MODE) \ -- (VSX_VECTOR_MODE (MODE) \ -- || VSX_SCALAR_MODE (MODE) \ -- || ALTIVEC_VECTOR_MODE (MODE) \ -- || (MODE) == TImode) -- - #define ALTIVEC_VECTOR_MODE(MODE) \ - ((MODE) == V16QImode \ - || (MODE) == V8HImode \ - || (MODE) == V4SFmode \ - || (MODE) == V4SImode) - -+#define ALTIVEC_OR_VSX_VECTOR_MODE(MODE) \ -+ (ALTIVEC_VECTOR_MODE (MODE) || VSX_VECTOR_MODE (MODE) \ -+ || (MODE) == V2DImode) -+ - #define SPE_VECTOR_MODE(MODE) \ - ((MODE) == V4HImode \ - || (MODE) == V2SFmode \ -@@ -1118,10 +1108,10 @@ - ? ALTIVEC_VECTOR_MODE (MODE2) \ - : ALTIVEC_VECTOR_MODE (MODE2) \ - ? ALTIVEC_VECTOR_MODE (MODE1) \ -- : VSX_VECTOR_MODE (MODE1) \ -- ? VSX_VECTOR_MODE (MODE2) \ -- : VSX_VECTOR_MODE (MODE2) \ -- ? VSX_VECTOR_MODE (MODE1) \ -+ : ALTIVEC_OR_VSX_VECTOR_MODE (MODE1) \ -+ ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE2) \ -+ : ALTIVEC_OR_VSX_VECTOR_MODE (MODE2) \ -+ ? ALTIVEC_OR_VSX_VECTOR_MODE (MODE1) \ - : 1) - - /* Post-reload, we can't use any new AltiVec registers, as we already - -Zmiany atrybutów dla: gcc/config/rs6000/rs6000.h -___________________________________________________________________ -Dodane: svn:mergeinfo - Połączono zmiany /trunk/gcc/config/rs6000/rs6000.h:r162404,173624 - -Index: gcc/config/arm/arm.c +--- boehm-gc/configure.ac (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ boehm-gc/configure.ac (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -392,6 +392,7 @@ + oldLIBS="$LIBS" + LIBS="$LIBS $THREADLIBS" + AC_CHECK_FUNCS([pthread_getattr_np]) ++AC_CHECK_FUNCS([pthread_get_stackaddr_np]) + LIBS="$oldLIBS" + + # Configuration of machine-dependent code +Index: boehm-gc/include/gc_config.h.in =================================================================== ---- gcc/config/arm/arm.c (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/arm/arm.c (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -18237,7 +18237,7 @@ - rtx tmp1 = gen_reg_rtx (mode); - rtx tmp2 = gen_reg_rtx (mode); +--- boehm-gc/include/gc_config.h.in (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ boehm-gc/include/gc_config.h.in (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -87,6 +87,9 @@ + /* Define to 1 if you have the `pthread_getattr_np' function. */ + #undef HAVE_PTHREAD_GETATTR_NP -- emit_insn (intfn (tmp1, op1, tmp2, op2)); -+ emit_insn (intfn (tmp1, op1, op2, tmp2)); ++/* Define to 1 if you have the `pthread_get_stackaddr_np_np' function. */ ++#undef HAVE_PTHREAD_GET_STACKADDR_NP ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_STDINT_H - emit_move_insn (mem, tmp1); - mem = adjust_address (mem, mode, GET_MODE_SIZE (mode)); -Index: gcc/config/arm/neon.md +Index: boehm-gc/include/private/gcconfig.h =================================================================== ---- gcc/config/arm/neon.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/arm/neon.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -680,7 +680,7 @@ - (match_operand:SI 2 "immediate_operand" "i")))] - "TARGET_NEON" - { -- int elt = ffs ((int) INTVAL (operands[2]) - 1); -+ int elt = ffs ((int) INTVAL (operands[2])) - 1; - if (BYTES_BIG_ENDIAN) - elt = GET_MODE_NUNITS (mode) - 1 - elt; - operands[2] = GEN_INT (elt); -@@ -3895,13 +3895,14 @@ - - (define_insn "neon_vtrn_internal" - [(set (match_operand:VDQW 0 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] -- UNSPEC_VTRN1)) -- (set (match_operand:VDQW 2 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] -- UNSPEC_VTRN2))] -+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") -+ (match_operand:VDQW 2 "s_register_operand" "w")] -+ UNSPEC_VTRN1)) -+ (set (match_operand:VDQW 3 "s_register_operand" "=2") -+ (unspec:VDQW [(match_dup 1) (match_dup 2)] -+ UNSPEC_VTRN2))] - "TARGET_NEON" -- "vtrn.\t%0, %2" -+ "vtrn.\t%0, %3" - [(set (attr "neon_type") - (if_then_else (ne (symbol_ref "") (const_int 0)) - (const_string "neon_bp_simple") -@@ -3921,13 +3922,14 @@ - - (define_insn "neon_vzip_internal" - [(set (match_operand:VDQW 0 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] -- UNSPEC_VZIP1)) -- (set (match_operand:VDQW 2 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] -- UNSPEC_VZIP2))] -+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") -+ (match_operand:VDQW 2 "s_register_operand" "w")] -+ UNSPEC_VZIP1)) -+ (set (match_operand:VDQW 3 "s_register_operand" "=2") -+ (unspec:VDQW [(match_dup 1) (match_dup 2)] -+ UNSPEC_VZIP2))] - "TARGET_NEON" -- "vzip.\t%0, %2" -+ "vzip.\t%0, %3" - [(set (attr "neon_type") - (if_then_else (ne (symbol_ref "") (const_int 0)) - (const_string "neon_bp_simple") -@@ -3947,13 +3949,14 @@ - - (define_insn "neon_vuzp_internal" - [(set (match_operand:VDQW 0 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")] -+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0") -+ (match_operand:VDQW 2 "s_register_operand" "w")] - UNSPEC_VUZP1)) -- (set (match_operand:VDQW 2 "s_register_operand" "=w") -- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")] -- UNSPEC_VUZP2))] -+ (set (match_operand:VDQW 3 "s_register_operand" "=2") -+ (unspec:VDQW [(match_dup 1) (match_dup 2)] -+ UNSPEC_VUZP2))] - "TARGET_NEON" -- "vuzp.\t%0, %2" -+ "vuzp.\t%0, %3" - [(set (attr "neon_type") - (if_then_else (ne (symbol_ref "") (const_int 0)) - (const_string "neon_bp_simple") -Index: gcc/config/pa/predicates.md +--- boehm-gc/include/private/gcconfig.h (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ boehm-gc/include/private/gcconfig.h (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1331,7 +1331,11 @@ + These aren't used when dyld support is enabled (it is by default) */ + # define DATASTART ((ptr_t) get_etext()) + # define DATAEND ((ptr_t) get_end()) +-# define STACKBOTTOM ((ptr_t) 0xc0000000) ++# ifdef HAVE_PTHREAD_GET_STACKADDR_NP ++# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self()) ++# else ++# define STACKBOTTOM ((ptr_t) 0xc0000000) ++# endif + # define USE_MMAP + # define USE_MMAP_ANON + # define USE_ASM_PUSH_REGS +@@ -2011,7 +2015,11 @@ + These aren't used when dyld support is enabled (it is by default) */ + # define DATASTART ((ptr_t) get_etext()) + # define DATAEND ((ptr_t) get_end()) +-# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000) ++# ifdef HAVE_PTHREAD_GET_STACKADDR_NP ++# define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self()) ++# else ++# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000) ++# endif + # define USE_MMAP + # define USE_MMAP_ANON + # ifdef GC_DARWIN_THREADS +Index: boehm-gc/ChangeLog =================================================================== ---- gcc/config/pa/predicates.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/pa/predicates.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -411,12 +411,16 @@ - - ;; True iff depi can be used to compute (reg | OP). - --(define_predicate "ior_operand" -- (match_code "const_int") --{ -- return (GET_CODE (op) == CONST_INT && ior_mask_p (INTVAL (op))); --}) -+(define_predicate "cint_ior_operand" -+ (and (match_code "const_int") -+ (match_test "ior_mask_p (INTVAL (op))"))) - -+;; True iff OP can be used to compute (reg | OP). +--- boehm-gc/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ boehm-gc/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -1,3 +1,17 @@ ++2012-03-02 Jack Howarth + -+(define_predicate "reg_or_cint_ior_operand" -+ (ior (match_operand 0 "register_operand") -+ (match_operand 0 "cint_ior_operand"))) ++ Backport from mainline ++ 2012-02-23 Patrick Marlier ++ Jack Howarth + - ;; True iff OP is a CONST_INT of the forms 0...0xxxx or - ;; 0...01...1xxxx. Such values can be the left hand side x in (x << - ;; r), using the zvdepi instruction. -Index: gcc/config/pa/pa.md -=================================================================== ---- gcc/config/pa/pa.md (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/pa/pa.md (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -5686,7 +5686,7 @@ - (define_expand "iordi3" - [(set (match_operand:DI 0 "register_operand" "") - (ior:DI (match_operand:DI 1 "register_operand" "") -- (match_operand:DI 2 "ior_operand" "")))] -+ (match_operand:DI 2 "reg_or_cint_ior_operand" "")))] - "" - " - { -@@ -5707,7 +5707,7 @@ - (define_insn "" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ior:DI (match_operand:DI 1 "register_operand" "0,0") -- (match_operand:DI 2 "ior_operand" "M,i")))] -+ (match_operand:DI 2 "cint_ior_operand" "M,i")))] - "TARGET_64BIT" - "* return output_64bit_ior (operands); " - [(set_attr "type" "binary,shift") -@@ -5726,19 +5726,14 @@ - (define_expand "iorsi3" - [(set (match_operand:SI 0 "register_operand" "") - (ior:SI (match_operand:SI 1 "register_operand" "") -- (match_operand:SI 2 "arith32_operand" "")))] -+ (match_operand:SI 2 "reg_or_cint_ior_operand" "")))] - "" -- " --{ -- if (! (ior_operand (operands[2], SImode) -- || register_operand (operands[2], SImode))) -- operands[2] = force_reg (SImode, operands[2]); --}") -+ "") ++ PR boehm-gc/52179 ++ * include/gc_config.h.in: Undefine HAVE_PTHREAD_GET_STACKADDR_NP. ++ * include/private/gcconfig.h (DARWIN): Define STACKBOTTOM with ++ pthread_get_stackaddr_np when available. ++ * configure.ac (THREADS): Check availability of ++ pthread_get_stackaddr_np. ++ * configure: Regenerate. ++ + 2012-03-01 Release Manager - (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ior:SI (match_operand:SI 1 "register_operand" "0,0") -- (match_operand:SI 2 "ior_operand" "M,i")))] -+ (match_operand:SI 2 "cint_ior_operand" "M,i")))] - "" - "* return output_ior (operands); " - [(set_attr "type" "binary,shift") -Index: gcc/config/pa/pa-protos.h + * GCC 4.6.3 released. +Index: boehm-gc/configure =================================================================== ---- gcc/config/pa/pa-protos.h (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ gcc/config/pa/pa-protos.h (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -79,7 +79,6 @@ - extern int prefetch_cc_operand (rtx, enum machine_mode); - extern int prefetch_nocc_operand (rtx, enum machine_mode); - extern int and_operand (rtx, enum machine_mode); --extern int ior_operand (rtx, enum machine_mode); - extern int arith32_operand (rtx, enum machine_mode); - extern int uint32_operand (rtx, enum machine_mode); - extern int reg_before_reload_operand (rtx, enum machine_mode); -@@ -94,7 +93,6 @@ - extern int fmpyaddoperands (rtx *); - extern int fmpysuboperands (rtx *); - extern int call_operand_address (rtx, enum machine_mode); --extern int ior_operand (rtx, enum machine_mode); - extern void emit_bcond_fp (rtx[]); - extern int emit_move_sequence (rtx *, enum machine_mode, rtx); - extern int emit_hpdiv_const (rtx *, int); -Index: libffi/src/alpha/osf.S +--- boehm-gc/configure (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ boehm-gc/configure (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -15246,6 +15246,17 @@ + fi + done + ++for ac_func in pthread_get_stackaddr_np ++do : ++ ac_fn_c_check_func "$LINENO" "pthread_get_stackaddr_np" "ac_cv_func_pthread_get_stackaddr_np" ++if test "x$ac_cv_func_pthread_get_stackaddr_np" = x""yes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_PTHREAD_GET_STACKADDR_NP 1 ++_ACEOF ++ ++fi ++done ++ + LIBS="$oldLIBS" + + # Configuration of machine-dependent code +Index: libjava/configure.ac =================================================================== ---- libffi/src/alpha/osf.S (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libffi/src/alpha/osf.S (.../branches/gcc-4_5-branch) (wersja 173771) -@@ -1,5 +1,5 @@ - /* ----------------------------------------------------------------------- -- osf.S - Copyright (c) 1998, 2001, 2007, 2008 Red Hat -+ osf.S - Copyright (c) 1998, 2001, 2007, 2008, 2011 Red Hat - - Alpha/OSF Foreign Function Interface - -@@ -299,33 +299,51 @@ - #endif - - #ifdef __ELF__ -+# define UA_SI .4byte -+# define FDE_ENCODING 0x1b /* pcrel sdata4 */ -+# define FDE_ENCODE(X) .4byte X-. -+# define FDE_ARANGE(X) .4byte X -+#elif defined __osf__ -+# define UA_SI .align 0; .long -+# define FDE_ENCODING 0x50 /* aligned absolute */ -+# define FDE_ENCODE(X) .align 3; .quad X -+# define FDE_ARANGE(X) .align 0; .quad X -+#endif -+ -+#ifdef __ELF__ - .section .eh_frame,EH_FRAME_FLAGS,@progbits -+#elif defined __osf__ -+ .data -+ .align 3 -+ .globl _GLOBAL__F_ffi_call_osf -+_GLOBAL__F_ffi_call_osf: -+#endif - __FRAME_BEGIN__: -- .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry -+ UA_SI $LECIE1-$LSCIE1 # Length of Common Information Entry - $LSCIE1: -- .4byte 0x0 # CIE Identifier Tag -+ UA_SI 0x0 # CIE Identifier Tag - .byte 0x1 # CIE Version - .ascii "zR\0" # CIE Augmentation - .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor - .byte 0x78 # sleb128 -8; CIE Data Alignment Factor - .byte 26 # CIE RA Column - .byte 0x1 # uleb128 0x1; Augmentation size -- .byte 0x1b # FDE Encoding (pcrel sdata4) -+ .byte FDE_ENCODING # FDE Encoding - .byte 0xc # DW_CFA_def_cfa - .byte 30 # uleb128 column 30 - .byte 0 # uleb128 offset 0 - .align 3 - $LECIE1: - $LSFDE1: -- .4byte $LEFDE1-$LASFDE1 # FDE Length -+ UA_SI $LEFDE1-$LASFDE1 # FDE Length - $LASFDE1: -- .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset -- .4byte $LFB1-. # FDE initial location -- .4byte $LFE1-$LFB1 # FDE address range -+ UA_SI $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset -+ FDE_ENCODE($LFB1) # FDE initial location -+ FDE_ARANGE($LFE1-$LFB1) # FDE address range - .byte 0x0 # uleb128 0x0; Augmentation size - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI1-$LFB1 -+ UA_SI $LCFI1-$LFB1 - .byte 0x9a # DW_CFA_offset, column 26 - .byte 4 # uleb128 4*-8 - .byte 0x8f # DW_CFA_offset, column 15 -@@ -335,32 +353,35 @@ - .byte 32 # uleb128 offset 32 - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI2-$LCFI1 -+ UA_SI $LCFI2-$LCFI1 - .byte 0xda # DW_CFA_restore, column 26 - .align 3 - $LEFDE1: - - $LSFDE3: -- .4byte $LEFDE3-$LASFDE3 # FDE Length -+ UA_SI $LEFDE3-$LASFDE3 # FDE Length - $LASFDE3: -- .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset -- .4byte $LFB2-. # FDE initial location -- .4byte $LFE2-$LFB2 # FDE address range -+ UA_SI $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset -+ FDE_ENCODE($LFB2) # FDE initial location -+ FDE_ARANGE($LFE2-$LFB2) # FDE address range - .byte 0x0 # uleb128 0x0; Augmentation size - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI5-$LFB2 -+ UA_SI $LCFI5-$LFB2 - .byte 0xe # DW_CFA_def_cfa_offset - .byte 0x80,0x1 # uleb128 128 - - .byte 0x4 # DW_CFA_advance_loc4 -- .4byte $LCFI6-$LCFI5 -+ UA_SI $LCFI6-$LCFI5 - .byte 0x9a # DW_CFA_offset, column 26 - .byte 16 # uleb128 offset 16*-8 - .align 3 - $LEFDE3: -+#if defined __osf__ -+ .align 0 -+ .long 0 # End of Table -+#endif - --#ifdef __linux__ -+#if defined __ELF__ && defined __linux__ - .section .note.GNU-stack,"",@progbits - #endif --#endif -Index: libffi/ChangeLog +--- libjava/configure.ac (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ libjava/configure.ac (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -886,14 +886,9 @@ + SYSTEMSPEC="-lunicows $SYSTEMSPEC" + fi + ;; +- *-*-darwin9*) ++ *-*-darwin[[912]]*) + SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" + ;; +- *-*-darwin[[12]]*) +- # Something is incompatible with pie, would be nice to fix it and +- # remove -no_pie. PR49461 +- SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" +- ;; + *) + SYSTEMSPEC= + ;; +Index: libjava/ChangeLog =================================================================== ---- libffi/ChangeLog (.../tags/gcc_4_5_3_release) (wersja 173771) -+++ libffi/ChangeLog (.../branches/gcc-4_5-branch) (wersja 173771) +--- libjava/ChangeLog (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ libjava/ChangeLog (.../branches/gcc-4_6-branch) (wersja 185440) @@ -1,3 +1,13 @@ -+2011-05-02 Rainer Orth ++2012-03-02 Jack Howarth + -+ Backport from mainline: -+ 2011-04-29 Rainer Orth ++ Backport from mainline ++ 2012-02-23 Patrick Marlier ++ Jack Howarth + -+ * src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE): -+ Define. -+ Use them to handle ELF vs. ECOFF differences. -+ [__osf__] (_GLOBAL__F_ffi_call_osf): Define. ++ PR target/49461 ++ * configure.ac (SYSTEMSPEC): No longer pass -no_pie for darwin11. ++ * configure: Regenerate. + - 2011-04-28 Release Manager + 2012-03-01 Release Manager - * GCC 4.5.3 released. + * GCC 4.6.3 released. +Index: libjava/configure +=================================================================== +--- libjava/configure (.../tags/gcc_4_6_3_release) (wersja 185440) ++++ libjava/configure (.../branches/gcc-4_6-branch) (wersja 185440) +@@ -19775,14 +19775,9 @@ + SYSTEMSPEC="-lunicows $SYSTEMSPEC" + fi + ;; +- *-*-darwin9*) ++ *-*-darwin[912]*) + SYSTEMSPEC="%{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" + ;; +- *-*-darwin[12]*) +- # Something is incompatible with pie, would be nice to fix it and +- # remove -no_pie. PR49461 +- SYSTEMSPEC="-no_pie %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}}" +- ;; + *) + SYSTEMSPEC= + ;; diff --git a/gcc-info.patch b/gcc-info.patch index 2298512..b848a13 100644 --- a/gcc-info.patch +++ b/gcc-info.patch @@ -303,3 +303,17 @@ @end direntry @c Part 3 Titlepage and Copyright +--- gcc-4.6.2/gcc/go/gccgo.texi.orig 2011-02-14 05:42:53.000000000 +0100 ++++ gcc-4.6.2/gcc/go/gccgo.texi 2011-10-31 18:27:12.670749858 +0100 +@@ -48,9 +48,9 @@ + + @ifinfo + @format +-@dircategory Software development ++@dircategory Programming Languages: + @direntry +-* Gccgo: (gccgo). A GCC-based compiler for the Go language ++* Gccgo: (gccgo). A GCC-based compiler for the Go language + @end direntry + @end format + diff --git a/gcc-plugin-decl-hook.patch b/gcc-plugin-decl-hook.patch index 9865f65..65b3e3f 100644 --- a/gcc-plugin-decl-hook.patch +++ b/gcc-plugin-decl-hook.patch @@ -1,180 +1,46 @@ -Date: Tue, 22 Dec 2009 10:00:29 -0800 -Subject: plugin event for C/C++ declarations -From: Brian Hackett -To: gcc-patches at gcc dot gnu dot org - -Hi, this patch adds a new plugin event FINISH_DECL, which is invoked -at every finish_decl in the C and C++ frontends. Previously there did -not seem to be a way for a plugin to see the definition for a global -that is never used in the input file, or the initializer for a global -which is declared before a function but defined after. This event -isn't restricted to just globals though, but also locals, fields, and -parameters (C frontend only). - -Index: gcc/doc/plugins.texi -=================================================================== ---- gcc/doc/plugins.texi (revision 155401) -+++ gcc/doc/plugins.texi (working copy) -@@ -146,6 +146,7 @@ enum plugin_event - PLUGIN_FINISH_TYPE, /* After finishing parsing a type. */ - PLUGIN_FINISH_UNIT, /* Useful for summary processing. */ - PLUGIN_PRE_GENERICIZE, /* Allows to see low level AST in C and C++ frontends. */ -+ PLUGIN_FINISH_DECL, /* Allows to see all declarations in C and C++ frontends. */ - PLUGIN_FINISH, /* Called before GCC exits. */ - PLUGIN_INFO, /* Information about the plugin. */ - PLUGIN_GGC_START, /* Called at start of GCC Garbage Collection. */ -Index: gcc/plugin.def -=================================================================== ---- gcc/plugin.def (revision 155386) -+++ gcc/plugin.def (working copy) -@@ -30,6 +30,9 @@ DEFEVENT (PLUGIN_FINISH_UNIT) - /* Allows to see low level AST in C and C++ frontends. */ - DEFEVENT (PLUGIN_PRE_GENERICIZE) - -+/* Allows to see all declarations in C and C++ frontends. */ -+DEFEVENT (PLUGIN_FINISH_DECL) -+ - /* Called before GCC exits. */ - DEFEVENT (PLUGIN_FINISH) - -Index: gcc/testsuite/g++.dg/plugin/plugin.exp -=================================================================== ---- gcc/testsuite/g++.dg/plugin/plugin.exp (revision 155401) -+++ gcc/testsuite/g++.dg/plugin/plugin.exp (working copy) -@@ -51,7 +51,8 @@ set plugin_test_list [list \ - { pragma_plugin.c pragma_plugin-test-1.C } \ - { selfassign.c self-assign-test-1.C self-assign-test-2.C self-assign-test-3.C } \ - { dumb_plugin.c dumb-plugin-test-1.C } \ -- { header_plugin.c header-plugin-test.C } ] -+ { header_plugin.c header-plugin-test.C } \ -+ { decl_plugin.c decl-plugin-test.C } ] - - foreach plugin_test $plugin_test_list { - # Replace each source file with its full-path name -Index: gcc/testsuite/g++.dg/plugin/decl-plugin-test.C -=================================================================== ---- gcc/testsuite/g++.dg/plugin/decl-plugin-test.C (revision 0) -+++ gcc/testsuite/g++.dg/plugin/decl-plugin-test.C (revision 0) -@@ -0,0 +1,32 @@ -+ -+ -+extern int global; // { dg-warning "Decl Global global" } -+int global_array[] = { 1, 2, 3 }; // { dg-warning "Decl Global global_array" } -+ -+int takes_args(int arg1, int arg2) -+{ -+ int local = arg1 + arg2 + global; // { dg-warning "Decl Local local" } -+ return local + 1; -+} -+ -+int global = 12; // { dg-warning "Decl Global global" } -+ -+struct test_str { -+ int field; // { dg-warning "Decl Field field" } -+}; -+ -+class test_class { -+ int class_field1; // { dg-warning "Decl Field class_field1" } -+ int class_field2; // { dg-warning "Decl Field class_field2" } -+ -+ test_class() // { dg-warning "Decl Function test_class" } -+ : class_field1(0), class_field2(0) -+ {} -+ -+ void swap_fields(int bias) // { dg-warning "Decl Function swap_fields" } -+ { -+ int temp = class_field1 + bias; // { dg-warning "Decl Local temp" } -+ class_field1 = class_field2 - bias; -+ class_field2 = temp; -+ } -+}; -Index: gcc/testsuite/g++.dg/plugin/decl_plugin.c -=================================================================== ---- gcc/testsuite/g++.dg/plugin/decl_plugin.c (revision 0) -+++ gcc/testsuite/g++.dg/plugin/decl_plugin.c (revision 0) -@@ -0,0 +1,51 @@ -+/* A plugin example that shows which declarations are caught by FINISH_DECL */ -+ -+#include "gcc-plugin.h" -+#include -+#include "config.h" -+#include "system.h" -+#include "coretypes.h" -+#include "tree.h" -+#include "tree-pass.h" -+#include "intl.h" -+ -+int plugin_is_GPL_compatible; -+ -+/* Callback function to invoke after GCC finishes a declaration. */ -+ -+void plugin_finish_decl (void *event_data, void *data) -+{ -+ tree decl = (tree) event_data; -+ -+ const char *kind = NULL; -+ switch (TREE_CODE(decl)) { -+ case FUNCTION_DECL: -+ kind = "Function"; break; -+ case PARM_DECL: -+ kind = "Parameter"; break; -+ case VAR_DECL: -+ if (DECL_CONTEXT(decl) != NULL) -+ kind = "Local"; -+ else -+ kind = "Global"; -+ break; -+ case FIELD_DECL: -+ kind = "Field"; break; -+ default: -+ kind = "Unknown"; -+ } -+ -+ warning (0, G_("Decl %s %s"), -+ kind, IDENTIFIER_POINTER (DECL_NAME (decl))); -+} -+ -+int -+plugin_init (struct plugin_name_args *plugin_info, -+ struct plugin_gcc_version *version) -+{ -+ const char *plugin_name = plugin_info->base_name; -+ -+ register_callback (plugin_name, PLUGIN_FINISH_DECL, -+ plugin_finish_decl, NULL); -+ return 0; -+} -Index: gcc/cp/decl.c -=================================================================== ---- gcc/cp/decl.c (revision 155386) -+++ gcc/cp/decl.c (working copy) -@@ -5949,6 +5949,8 @@ cp_finish_decl (tree decl, tree init, bo - /* If this was marked 'used', be sure it will be output. */ - if (lookup_attribute ("used", DECL_ATTRIBUTES (decl))) - mark_decl_referenced (decl); +diff --git a/gcc/c-decl.c b/gcc/c-decl.c +index b438b06..c3738b9 100644 +--- a/gcc/c-decl.c ++++ b/gcc/c-decl.c +@@ -4480,6 +4480,8 @@ finish_decl (tree decl, location_t init_loc, tree init, + && C_TYPE_FIELDS_READONLY (type)) + diagnose_uninitialized_cst_member (decl, type); + } + + invoke_plugin_callbacks(PLUGIN_FINISH_DECL, decl); } - - /* Returns a declaration for a VAR_DECL as if: -Index: gcc/c-decl.c -=================================================================== ---- gcc/c-decl.c (revision 155386) -+++ gcc/c-decl.c (working copy) -@@ -4389,6 +4389,8 @@ finish_decl (tree decl, location_t init_ - && DECL_INITIAL (decl) == NULL_TREE) - warning_at (DECL_SOURCE_LOCATION (decl), OPT_Wc___compat, - "uninitialized const %qD is invalid in C++", decl); + + /* Given a parsed parameter declaration, decode it into a PARM_DECL. */ +diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c +index 6a13cc4..9752cf4 100644 +--- a/gcc/cp/decl.c ++++ b/gcc/cp/decl.c +@@ -6147,6 +6147,8 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, + + if (was_readonly) + TREE_READONLY (decl) = 1; + + invoke_plugin_callbacks(PLUGIN_FINISH_DECL, decl); } - - /* Given a parsed parameter declaration, decode it into a PARM_DECL. */ -Index: gcc/plugin.c -=================================================================== ---- gcc/plugin.c (revision 155386) -+++ gcc/plugin.c (working copy) -@@ -403,6 +403,7 @@ register_callback (const char *plugin_na + + /* Returns a declaration for a VAR_DECL as if: +diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi +index 767cee8..d989ddd 100644 +--- a/gcc/doc/plugins.texi ++++ b/gcc/doc/plugins.texi +@@ -153,6 +153,7 @@ enum plugin_event + PLUGIN_FINISH_TYPE, /* After finishing parsing a type. */ + PLUGIN_FINISH_UNIT, /* Useful for summary processing. */ + PLUGIN_PRE_GENERICIZE, /* Allows to see low level AST in C and C++ frontends. */ ++ PLUGIN_FINISH_DECL, /* Allows to see all declarations in C and C++ frontends. */ + PLUGIN_FINISH, /* Called before GCC exits. */ + PLUGIN_INFO, /* Information about the plugin. */ + PLUGIN_GGC_START, /* Called at start of GCC Garbage Collection. */ +diff --git a/gcc/plugin.c b/gcc/plugin.c +index c93daed..f65e54a 100644 +--- a/gcc/plugin.c ++++ b/gcc/plugin.c +@@ -423,6 +423,7 @@ register_callback (const char *plugin_name, case PLUGIN_START_UNIT: case PLUGIN_FINISH_UNIT: case PLUGIN_PRE_GENERICIZE: @@ -182,7 +48,7 @@ Index: gcc/plugin.c case PLUGIN_GGC_START: case PLUGIN_GGC_MARKING: case PLUGIN_GGC_END: -@@ -484,6 +485,7 @@ invoke_plugin_callbacks (int event, void +@@ -499,6 +500,7 @@ invoke_plugin_callbacks_full (int event, void *gcc_data) case PLUGIN_START_UNIT: case PLUGIN_FINISH_UNIT: case PLUGIN_PRE_GENERICIZE: @@ -190,3 +56,17 @@ Index: gcc/plugin.c case PLUGIN_ATTRIBUTES: case PLUGIN_PRAGMAS: case PLUGIN_FINISH: +diff --git a/gcc/plugin.def b/gcc/plugin.def +index 4a40c2c..4f8ad08 100644 +--- a/gcc/plugin.def ++++ b/gcc/plugin.def +@@ -30,6 +30,9 @@ DEFEVENT (PLUGIN_FINISH_UNIT) + /* Allows to see low level AST in C and C++ frontends. */ + DEFEVENT (PLUGIN_PRE_GENERICIZE) + ++/* Allows to see all declarations in C and C++ frontends. */ ++DEFEVENT (PLUGIN_FINISH_DECL) ++ + /* Called before GCC exits. */ + DEFEVENT (PLUGIN_FINISH) + diff --git a/gcc.spec b/gcc.spec index 71420f4..187152b 100644 --- a/gcc.spec +++ b/gcc.spec @@ -3,37 +3,38 @@ # TODO: # - gconf peer? (but libgcj needs split anyway) # - package? -# /usr/bin/aot-compile -# /usr/bin/gjdoc -# /usr/share/man/man1/aot-compile.1.gz +# /usr/bin/gjdoc [BR: antlr.jar] (but see gjdoc package, there are some additional jars?) # /usr/share/man/man1/gjdoc.1.gz -# /usr/share/python/aotcompile.py -# /usr/share/python/classfile.py -# - missing libffi.pc required by some packages (eg. python-pygobject) # # Conditional build: +# - languages: %bcond_without ada # build without ADA support %bcond_without cxx # build without C++ support %bcond_without fortran # build without Fortran support -%bcond_without gomp # build without OpenMP support +%bcond_without go # build without Go support %bcond_without java # build without Java support -%bcond_without mudflap # build without Mudflap pointer debugging support %bcond_without objc # build without Objective-C support %bcond_without objcxx # build without Objective-C++ support +# - features: +%bcond_without gomp # build without OpenMP support +%bcond_without mudflap # build without Mudflap pointer debugging support +%bcond_without multilib # build without multilib support (it needs glibc[32&64]-devel) +%bcond_with profiling # build with profiling +%bcond_without python # build without libstdc++ printers for gdb and aot-compile for java +# - libgcj options: %bcond_without alsa # don't build libgcj ALSA MIDI interface %bcond_without dssi # don't build libgcj DSSI MIDI interface %bcond_without gtk # don't build libgcj GTK peer %bcond_without apidocs # do not build and package API docs -%bcond_with mozilla # don't build libgcjwebplugin (needs fix for new xulrunner) +%bcond_with mozilla # build libgcjwebplugin (needs fix for new xulrunner) %bcond_with qt # build libgcj Qt peer (currently doesn't build with libtool-2.x) %bcond_without x # don't build libgcj Xlib-dependent AWTs (incl. GTK/Qt) -%bcond_without multilib # build without multilib support (it needs glibc[32&64]-devel) -%bcond_with profiling # build with profiling -%bcond_without python # build without libstdc++ python pretty printers for gdb +# - other: %bcond_without bootstrap # omit 3-stage bootstrap %bcond_with tests # torture gcc %if %{without cxx} +%undefine with_go %undefine with_java %undefine with_objcxx %endif @@ -55,12 +56,17 @@ %undefine with_multilib %endif -%define major_ver 4.5 +%ifarch i386 i486 +# __i686.get_pc_thunk.bx undefined in libgo (TODO: recheck on gcc updates) +%undefine with_go +%endif + +%define major_ver 4.6 %define minor_ver 3 %define major_ecj_ver 4.5 # class data version seen with file(1) that this jvm is able to load %define _classdataversion 50.0 -%define gcj_soname_ver 11 +%define gcj_soname_ver 12 Summary: GNU Compiler Collection: the C compiler and shared files Summary(es.UTF-8): Colección de compiladores GNU: el compilador C y ficheros compartidos @@ -68,34 +74,37 @@ Summary(pl.UTF-8): Kolekcja kompilatorów GNU: kompilator C i pliki współdziel Summary(pt_BR.UTF-8): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados Name: gcc Version: %{major_ver}.%{minor_ver} -Release: 7 +Release: 4 Epoch: 6 License: GPL v3+ Group: Development/Languages Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 8e0b5c12212e185f3e4383106bfa9cc6 +# Source0-md5: 773092fe5194353b02bb0110052a972e Source1: %{name}-optimize-la.pl Source2: ftp://sourceware.org/pub/java/ecj-%{major_ecj_ver}.jar # Source2-md5: d7cd6a27c8801e66cbaa964a039ecfdb -# svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_5_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch > gcc-branch.diff +# check libffi version with libffi/configure.ac +Source3: libffi.pc.in +# svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_6_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch > gcc-branch.diff Patch100: %{name}-branch.diff Patch0: %{name}-info.patch -Patch1: %{name}-nolocalefiles.patch Patch2: %{name}-nodebug.patch Patch3: %{name}-ada-link.patch Patch7: %{name}-libjava-multilib.patch Patch8: %{name}-enable-java-awt-qt.patch -Patch9: %{name}-hash-style-gnu.patch -Patch11: %{name}-build-id.patch +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41757 Patch12: %{name}-plugin-decl-hook.patch +Patch13: issue4664051.patch +Patch14: %{name}-extern-template-sed.patch URL: http://gcc.gnu.org/ -BuildRequires: autoconf +BuildRequires: autoconf >= 2.64 %{?with_tests:BuildRequires: autogen} -BuildRequires: automake +BuildRequires: automake >= 1:1.9.3 # binutils 2.17.50.0.9 or newer are required for fixing PR middle-end/20218. -BuildRequires: binutils >= 2:2.17.50.0.9-1 +BuildRequires: binutils >= 3:2.17.50.0.9-1 BuildRequires: bison BuildRequires: chrpath >= 0.13-2 +BuildRequires: cloog-ppl-devel %{?with_tests:BuildRequires: dejagnu} BuildRequires: elfutils-devel >= 0.145-1 BuildRequires: fileutils >= 4.0.41 @@ -115,6 +124,7 @@ BuildRequires: glibc-devel(i686) BuildRequires: gmp-devel >= 4.1 BuildRequires: libmpc-devel BuildRequires: mpfr-devel >= 2.3.0 +BuildRequires: ppl-devel %if %{with python} BuildRequires: python-devel BuildRequires: rpm-pythonprov @@ -133,6 +143,7 @@ BuildRequires: libxslt-devel >= 1.1.11 BuildRequires: perl-base BuildRequires: perl-tools-pod BuildRequires: pkgconfig +BuildRequires: sed >= 4.0 BuildRequires: unzip BuildRequires: zip %if %{with gtk} @@ -169,7 +180,10 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # 32-bit environment on x86-64 %define _slibdir32 /lib %define _libdir32 /usr/lib +%define _pkgconfigdir32 %{_libdir32}/pkgconfig %endif +%define gcclibdir %{_libdir}/gcc/%{_target_platform}/%{version} +%define gcjdbexecdir gcj-%{version}-%{gcj_soname_ver} %define filterout -fwrapv -fno-strict-aliasing -fsigned-char %define filterout_ld -Wl,--as-needed @@ -667,7 +681,6 @@ standardowej C++. Summary: libstdc++ pretty printers for GDB Summary(pl.UTF-8): Funkcje wypisujące dane libstdc++ dla GDB Group: Development/Debuggers -Requires: python-gdb %description -n libstdc++-gdb This package contains Python scripts for GDB pretty printing of the @@ -780,6 +793,7 @@ Summary(pt_BR.UTF-8): Suporte Fortran 95 para o GCC Group: Development/Languages/Fortran Requires: %{name} = %{epoch}:%{version}-%{release} Requires: libgfortran = %{epoch}:%{version}-%{release} +Requires: libquadmath-devel = %{epoch}:%{version}-%{release} Provides: gcc-g77 = %{epoch}:%{version}-%{release} Obsoletes: egcs-g77 Obsoletes: gcc-g77 @@ -805,6 +819,7 @@ Summary(pl.UTF-8): Obsługa binariów 32-bitowych Fortrana 95 dla gcc Group: Development/Languages/Fortran Requires: %{name}-fortran = %{epoch}:%{version}-%{release} Requires: libgfortran-multilib = %{epoch}:%{version}-%{release} +Requires: libquadmath-multilib-devel = %{epoch}:%{version}-%{release} %description fortran-multilib This package adds support for compiling 32-bit Fortran 95 programs @@ -820,6 +835,7 @@ Summary(es.UTF-8): Biblioteca de Fortran 95 Summary(pl.UTF-8): Biblioteka Fortrana 95 License: GPL v2+ with unlimited link permission Group: Libraries +Requires: libquadmath = %{epoch}:%{version}-%{release} Obsoletes: libg2c %description -n libgfortran @@ -836,6 +852,7 @@ Summary: Fortran 95 Library - 32-bit version Summary(pl.UTF-8): Biblioteka Fortrana 95 - wersja 32-bitowa License: GPL v2+ with unlimited link permission Group: Libraries +Requires: libquadmath-multilib = %{epoch}:%{version}-%{release} %description -n libgfortran-multilib Fortran 95 Library - 32-bit version. @@ -874,6 +891,97 @@ Static Fortran 95 Library - 32-bit version. %description -n libgfortran-multilib-static -l pl.UTF-8 Statyczna biblioteka Fortrana 95 - wersja 32-bitowa. +%package -n libquadmath +Summary: GCC __float128 shared support library +Summary(pl.UTF-8): Biblioteka współdzielona do obsługi typu __float128 +License: GPL v2+ with linking exception +Group: Libraries + +%description -n libquadmath +This package contains GCC shared support library which is needed for +__float128 math support and for Fortran REAL*16 support. + +%description -n libquadmath -l pl.UTF-8 +Ten pakiet zawiera bibliotekę współdzieloną GCC do obsługi operacji +matematycznych na zmiennych typu __float128 oraz typu REAL*16 w +Fortranie. + +%package -n libquadmath-multilib +Summary: GCC __float128 shared support library - 32-bit version +Summary(pl.UTF-8): Biblioteka współdzielona GCC do obsługi typu __float128 - wersja 32-bitowa +License: GPL v2+ with linking exception +Group: Libraries + +%description -n libquadmath-multilib +This package contains 32-bit version of GCC shared support library +which is needed for __float128 math support and for Fortran REAL*16 +support. + +%description -n libquadmath-multilib -l pl.UTF-8 +Ten pakiet zawiera 32-bitową bibliotekę współdzieloną GCC do obsługi +operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16 +w Fortranie. + +%package -n libquadmath-devel +Summary: Header files for GCC __float128 support library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteka GCC do obsługi typu __float128 +License: GPL v2+ with linking exception +Group: Development/Libraries +Requires: libquadmath = %{epoch}:%{version}-%{release} + +%description -n libquadmath-devel +This package contains header files for GCC support library which is +needed for __float128 math support and for Fortran REAL*16 support. + +%description -n libquadmath-devel -l pl.UTF-8 +Ten pakiet zawiera pliki nagłówkowe biblioteki GCC do obsługi operacji +matematycznych na zmiennych typu __float128 oraz typu REAL*16 w +Fortranie. + +%package -n libquadmath-multilib-devel +Summary: Development files for 32-bit GCC __float128 support library +Summary(pl.UTF-8): Pliki programistyczne 32-bitowej biblioteki do obsługi typu __float128 +License: GPL v2+ with linking exception +Group: Development/Libraries +Requires: libquadmath-devel = %{epoch}:%{version}-%{release} +Requires: libquadmath-multilib = %{epoch}:%{version}-%{release} + +%description -n libquadmath-multilib-devel +This package contains development files for 32-bit GCC support library +which is needed for __float128 math support and for Fortran REAL*16 +support. + +%description -n libquadmath-multilib-devel -l pl.UTF-8 +Ten pakiet zawiera pliki programistyczne 32-bitowej biblioteki GCC do +obsługi operacji matematycznych na zmiennych typu __float128 oraz typu +REAL*16 w Fortranie. + +%package -n libquadmath-static +Summary: Static GCC __float128 support library +Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 +License: GPL v2+ with linking exception +Group: Development/Libraries +Requires: libquadmath-devel = %{epoch}:%{version}-%{release} + +%description -n libquadmath-static +Static GCC __float128 support library. + +%description -n libquadmath-static -l pl.UTF-8 +Biblioteka statyczna GCC do obsługi typu __float128. + +%package -n libquadmath-multilib-static +Summary: Static GCC __float128 support library - 32-bit version +Summary(pl.UTF-8): 32-bitowa biblioteka statyczna GCC do obsługi typu __float128 +License: GPL v2+ with linking exception +Group: Development/Libraries +Requires: libquadmath-multilib-devel = %{epoch}:%{version}-%{release} + +%description -n libquadmath-multilib-static +Static GCC __float128 support library - 32-bit version. + +%description -n libquadmath-multilib-static -l pl.UTF-8 +32-bitowa biblioteka statyczna GCC do obsługi typu __float128. + %package java Summary: Java support for gcc Summary(es.UTF-8): Soporte de Java para gcc @@ -902,6 +1010,23 @@ Ten pakiet dodaje możliwość kompilowania programów w języku Java(TM) oraz bajtkodu do kodu natywnego. Do używania go wymagany jest dodatkowo pakiet libgcj. +%package java-aotcompile +Summary: Java AOT-compiler - compiling bytecode to native +Summary(pl.UTF-8): Kompilator AOT dla Javy - kompilacja bajtkodu do kodu natywnego +License: GPL v2+ +Group: Development/Tools +Requires: %{name}-java = %{epoch}:%{version}-%{release} + +%description java-aotcompile +aot-compile is a script that searches a directory for Java bytecode +(as class files, or in jars) and uses gcj to compile it to native code +and generate the databases from it. + +%description java-aotcompile -l pl.UTF-8 +aot-compile to skrypt wyszukujący w katalogu bajtkod Javy (w plikach +class lub jarach) i kompilujący go przy użyciu gcj, a następnie +generujący z niego bazy danych. + %package -n libgcj Summary: Java Class Libraries Summary(es.UTF-8): Bibliotecas de clases de Java @@ -1204,11 +1329,120 @@ Static Objective C Library - 32-bit version. %description -n libobjc-multilib-static -l pl.UTF-8 Statyczna biblioteki Obiektowego C - wersja 32-bitowa. +%package go +Summary: Go language support for gcc +Summary(pl.UTF-8): Obsługa języka Go dla kompilatora gcc +License: GPL v3+ (gcc), BSD (Go-specific part) +Group: Development/Languages +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: libgo-devel = %{epoch}:%{version}-%{release} + +%description go +This package adds Go language support to the GNU Compiler Collection. + +%description go -l pl.UTF-8 +Ten pakiet dodaje obsługę języka Go do kompilatora gcc. + +%package go-multilib +Summary: 32-bit Go language support for gcc +Summary(pl.UTF-8): Obsługa 32-bitowych binariów języka Go dla kompilatora gcc +License: GPL v3+ (gcc), BSD (Go-specific part) +Group: Development/Languages +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: libgo-multilib-devel = %{epoch}:%{version}-%{release} + +%description go-multilib +This package adds 32-bit Go language support to the GNU Compiler +Collection. + +%description go-multilib -l pl.UTF-8 +Ten pakiet dodaje obsługę 32-bitowych binariów języka Go do +kompilatora gcc. + +%package -n libgo +Summary: Go language library +Summary(pl.UTF-8): Biblioteka języka Go +License: BSD +Group: Libraries +Requires: libgcc >= %{epoch}:%{version}-%{release} + +%description -n libgo +Go language library. + +%description -n libgo -l pl.UTF-8 +Biblioteka języka Go. + +%package -n libgo-multilib +Summary: Go language library - 32-bit version +Summary(pl.UTF-8): Biblioteka języka Go - wersja 32-bitowa +License: BSD +Group: Libraries +Requires: libgcc-multilib >= %{epoch}:%{version}-%{release} + +%description -n libgo-multilib +Go language library - 32-bit version. + +%description -n libgo-multilib -l pl.UTF-8 +Biblioteka języka Go - wersja 32-bitowa. + +%package -n libgo-devel +Summary: Development files for Go language library +Summary(pl.UTF-8): Pliki programistyczne biblioteki języka Go +License: BSD +Group: Development/Libraries +Requires: glibc-devel +Requires: libgo = %{epoch}:%{version}-%{release} + +%description -n libgo-devel +Development files for Go language library. + +%description -n libgo-devel -l pl.UTF-8 +Pliki programistyczne biblioteki języka Go. + +%package -n libgo-multilib-devel +Summary: Development files for Go language library - 32-bit version +Summary(pl.UTF-8): Pliki programistyczne biblioteki języka Go - wersja 32-bitowa +License: BSD +Group: Development/Libraries +Requires: glibc-devel +Requires: libgo-multilib = %{epoch}:%{version}-%{release} + +%description -n libgo-multilib-devel +Development files for Go language library - 32-bit version. + +%description -n libgo-multilib-devel -l pl.UTF-8 +Pliki programistyczne biblioteki języka Go - wersja 32-bitowa. + +%package -n libgo-static +Summary: Static Go language library +Summary(pl.UTF-8): Statyczna biblioteka języka Go +License: BSD +Group: Development/Libraries +Requires: libgo-devel = %{epoch}:%{version}-%{release} + +%description -n libgo-static +Static Go language library. + +%description -n libgo-static -l pl.UTF-8 +Statyczna biblioteka języka Go. + +%package -n libgo-multilib-static +Summary: Static Go language library - 32-bit version +Summary(pl.UTF-8): Statyczna biblioteka języka Go - wersja 32-bitowa +License: BSD +Group: Development/Libraries +Requires: libgo-multilib-devel = %{epoch}:%{version}-%{release} + +%description -n libgo-multilib-static +Static Go language library - 32-bit version. + +%description -n libgo-multilib-static -l pl.UTF-8 +Statyczna biblioteka języka Go - wersja 32-bitowa. + %prep %setup -q %patch100 -p0 %patch0 -p1 -%patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -1216,15 +1450,15 @@ Statyczna biblioteki Obiektowego C - wersja 32-bitowa. %if %{with qt} %patch8 -p1 %endif -%patch9 -p1 -%patch11 -p0 -%patch12 -p0 +%patch12 -p1 +%patch13 -p0 +%patch14 -p1 mv ChangeLog ChangeLog.general %if %{with java} # see contrib/download_ecj -install %{SOURCE2} ecj.jar +cp -p %{SOURCE2} ecj.jar %endif # override snapshot version. @@ -1260,10 +1494,13 @@ TEXCONFIG=false \ --mandir=%{_mandir} \ --x-libraries=%{_libdir} \ --enable-checking=release \ + --enable-gnu-unique-object \ + --with-linker-hash-style=gnu \ --enable-shared \ --enable-threads=posix \ + --enable-linker-build-id \ --enable-linux-futex \ - --enable-languages="c%{?with_cxx:,c++}%{?with_fortran:,fortran}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}" \ + --enable-languages="c%{?with_cxx:,c++}%{?with_fortran:,fortran}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}%{?with_go:,go}" \ --%{?with_gomp:en}%{!?with_gomp:dis}able-libgomp \ --%{?with_mudflap:en}%{!?with_mudflap:dis}able-libmudflap \ --enable-c99 \ @@ -1276,9 +1513,6 @@ TEXCONFIG=false \ --enable-plugin \ %ifarch %{ix86} %{x8664} --disable-cld \ -%endif -%ifarch sparc64 - --with-cpu=ultrasparc \ %endif --with-gnu-as \ --with-gnu-ld \ @@ -1293,9 +1527,8 @@ TEXCONFIG=false \ %{!?with_java:--without-x} \ %{?with_fortran:--enable-cmath} \ --with-long-double-128 \ -%ifarch ppc ppc64 - --enable-secureplt \ -%endif + --with-ppl \ + --with-cloog-ppl \ %if %{with cxx} --with-gxx-include-dir=%{_includedir}/c++/%{version} \ --disable-libstdcxx-pch \ @@ -1361,7 +1594,7 @@ cd builddir infodir=%{_infodir} \ DESTDIR=$RPM_BUILD_ROOT -install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version} +cp -p gcc/specs $RPM_BUILD_ROOT%{gcclibdir} ln -sf %{_bindir}/cpp $RPM_BUILD_ROOT/lib/cpp ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc @@ -1383,7 +1616,7 @@ echo ".so gfortran.1" > $RPM_BUILD_ROOT%{_mandir}/man1/g95.1 %if %{with ada} # move ada shared libraries to proper place... -mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/adalib/*.so.1 \ +mv -f $RPM_BUILD_ROOT%{gcclibdir}/adalib/*.so.1 \ $RPM_BUILD_ROOT%{_libdir} # check if symlink to be made is valid test -f $RPM_BUILD_ROOT%{_libdir}/libgnat-%{major_ver}.so.1 @@ -1392,7 +1625,7 @@ ln -sf libgnarl-%{major_ver}.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnarl-%{major_ver ln -sf libgnat-%{major_ver}.so $RPM_BUILD_ROOT%{_libdir}/libgnat.so ln -sf libgnarl-%{major_ver}.so $RPM_BUILD_ROOT%{_libdir}/libgnarl.so %if %{with multilib} -mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/32/adalib/*.so.1 \ +mv -f $RPM_BUILD_ROOT%{gcclibdir}/32/adalib/*.so.1 \ $RPM_BUILD_ROOT%{_libdir32} # check if symlink to be made is valid test -f $RPM_BUILD_ROOT%{_libdir32}/libgnat-%{major_ver}.so.1 @@ -1409,21 +1642,32 @@ cd .. install -d java-doc cp -f libjava/READ* java-doc ln -sf libgcj-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/libgcj.jar -rm -f $RPM_BUILD_ROOT%{_libdir}/classpath/libgjs*.la -# tools.zip sources -rm -rf $RPM_BUILD_ROOT%{_datadir}/classpath/tools/gnu + +# still not installed by gcc? +[ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libffi.pc ] || exit 1 +sed -e 's,@prefix@,%{_prefix}, + s,@exec_prefix@,%{_exec_prefix}, + s,@libdir@,%{_libdir}, + s,@gcclibdir@,%{gcclibdir},' %{SOURCE3} >$RPM_BUILD_ROOT%{_pkgconfigdir}/libffi.pc +%if %{with multilib} +[ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir32}/libffi.pc ] || exit 1 +install -d $RPM_BUILD_ROOT%{_pkgconfigdir32} +sed -e 's,@prefix@,%{_prefix}, + s,@exec_prefix@,%{_exec_prefix}, + s,@libdir@,%{_libdir32}, + s,@gcclibdir@,%{gcclibdir},' %{SOURCE3} >$RPM_BUILD_ROOT%{_pkgconfigdir32}/libffi.pc +%endif %endif + %if %{with objc} cp -f libobjc/README gcc/objc/README.libobjc %endif -%define gcjdbexecdir gcj-%{version}-%{gcj_soname_ver} - -# avoid -L poisoning in *.la - there should be only -L%{_libdir}/gcc/*/%{version} +# avoid -L poisoning in *.la - there should be only -L%{_libdir}/gcc/%{_target_platform}/%{version} # normalize libdir, to avoid propagation of unnecessary RPATHs by libtool for f in libssp.la libssp_nonshared.la \ %{?with_cxx:libstdc++.la libsupc++.la} \ - %{?with_fortran:libgfortran.la} \ + %{?with_fortran:libgfortran.la libquadmath.la} \ %{?with_gomp:libgomp.la} \ %{?with_mudflap:libmudflap.la libmudflapth.la} \ %if %{with java} @@ -1444,7 +1688,7 @@ done %if %{with multilib} for f in libssp.la libssp_nonshared.la \ %{?with_cxx:libstdc++.la libsupc++.la} \ - %{?with_fortran:libgfortran.la} \ + %{?with_fortran:libgfortran.la libquadmath.la} \ %{?with_gomp:libgomp.la} \ %{?with_mudflap:libmudflap.la libmudflapth.la} \ %{?with_java:libffi.la} \ @@ -1455,11 +1699,10 @@ do done %endif -gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*) -cp $gccdir/install-tools/include/*.h $gccdir/include -cp $gccdir/include-fixed/syslimits.h $gccdir/include -rm -rf $gccdir/install-tools -rm -rf $gccdir/include-fixed +cp -p $RPM_BUILD_ROOT%{gcclibdir}/install-tools/include/*.h $RPM_BUILD_ROOT%{gcclibdir}/include +cp -p $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/syslimits.h $RPM_BUILD_ROOT%{gcclibdir}/include +%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools +%{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed %if %{with python} for LIB in lib lib64; do @@ -1469,13 +1712,27 @@ for LIB in lib lib64; do sed -e 's,@pythondir@,%{_datadir}/gdb,' \ -e 's,@toolexeclibdir@,%{_prefix}/'"$LIB," \ < libstdc++-v3/python/hook.in \ - > $LIBPATH/$(basename $RPM_BUILD_ROOT/%{_prefix}/%{_lib}/libstdc++.so.*.*.*)-gdb.py + > $LIBPATH/$(basename $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libstdc++.so.*.*.*)-gdb.py done install -d $RPM_BUILD_ROOT%{py_sitescriptdir} -cp -a libstdc++-v3/python/libstdcxx $RPM_BUILD_ROOT%{py_sitescriptdir} +mv $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx $RPM_BUILD_ROOT%{py_sitescriptdir} +%if %{with java} +mv $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libjava $RPM_BUILD_ROOT%{py_sitescriptdir} +%endif +%{__sed} -i -e '1s,#!/usr/bin/env python,#!/usr/bin/python,' $RPM_BUILD_ROOT%{_bindir}/aot-compile %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} %py_postclean +%else +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx +%if %{with java} +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libjava +%endif +%endif +# script(s) always installed; see above for builds with python; if no python, just don't package +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libstdc++.so.*-gdb.py +%if %{with multilib} +%{__rm} $RPM_BUILD_ROOT%{_libdir32}/libstdc++.so.*-gdb.py %endif %find_lang gcc @@ -1484,14 +1741,11 @@ cat cpplib.lang >> gcc.lang %if %{with cxx} %find_lang libstdc\+\+ -install libstdc++-v3/include/precompiled/* $RPM_BUILD_ROOT%{_includedir} +cp -p libstdc++-v3/include/precompiled/* $RPM_BUILD_ROOT%{_includedir} %endif -# gdb stuff maybe? -%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.py -%if %{with multilib} -%{__rm} $RPM_BUILD_ROOT%{_libdir32}/*.py -%endif +# always -f, as "dir" is created depending which texlive version is installed +%{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir # svn snap doesn't contain (release does) below files, # so let's create dummy entries to satisfy %%files. @@ -1526,6 +1780,12 @@ rm -rf $RPM_BUILD_ROOT %postun java -p /sbin/postshell -/usr/sbin/fix-info-dir -c %{_infodir} +%post go -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + +%postun go -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + %post -p /sbin/ldconfig -n libgcc %postun -p /sbin/ldconfig -n libgcc %post -p /sbin/ldconfig -n libgcc-multilib @@ -1560,6 +1820,18 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig -n libobjc %post -p /sbin/ldconfig -n libobjc-multilib %postun -p /sbin/ldconfig -n libobjc-multilib +%post -n libquadmath +/sbin/ldconfig +[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 +%postun -n libquadmath +/sbin/ldconfig +[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 +%post -p /sbin/ldconfig -n libquadmath-multilib +%postun -p /sbin/ldconfig -n libquadmath-multilib +%post -p /sbin/ldconfig -n libgo +%postun -p /sbin/ldconfig -n libgo +%post -p /sbin/ldconfig -n libgo-multilib +%postun -p /sbin/ldconfig -n libgo-multilib %files -f gcc.lang %defattr(644,root,root,755) @@ -1570,7 +1842,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/cc %attr(755,root,root) %{_bindir}/cpp %attr(755,root,root) %{_bindir}/gcc -%attr(755,root,root) %{_bindir}/gccbug +#%attr(755,root,root) %{_bindir}/gccbug %attr(755,root,root) %{_bindir}/gcov %{_mandir}/man1/cc.1* %{_mandir}/man1/cpp.1* @@ -1589,78 +1861,84 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libssp_nonshared.la %{_libdir}/libssp_nonshared.a %dir %{_libdir}/gcc -%dir %{_libdir}/gcc/* -%dir %{_libdir}/gcc/*/* -%{_libdir}/gcc/*/*/libgcc.a -%{_libdir}/gcc/*/*/libgcc_eh.a -%{_libdir}/gcc/*/*/libgcov.a -%{_libdir}/gcc/*/*/specs -%{_libdir}/gcc/*/*/crt*.o -%attr(755,root,root) %{_libdir}/gcc/*/*/cc1 -%attr(755,root,root) %{_libdir}/gcc/*/*/collect2 -%attr(755,root,root) %{_libdir}/gcc/*/*/lto-wrapper -%attr(755,root,root) %{_libdir}/gcc/*/*/lto1 -%{_libdir}/gcc/*/*/plugin -%dir %{_libdir}/gcc/*/*/include -%dir %{_libdir}/gcc/*/*/include/ssp -%{_libdir}/gcc/*/*/include/ssp/*.h -%{_libdir}/gcc/*/*/include/float.h -%{_libdir}/gcc/*/*/include/iso646.h -%{_libdir}/gcc/*/*/include/limits.h -%{_libdir}/gcc/*/*/include/stdarg.h -%{_libdir}/gcc/*/*/include/stdbool.h -%{_libdir}/gcc/*/*/include/stddef.h -%{_libdir}/gcc/*/*/include/stdfix.h -%{_libdir}/gcc/*/*/include/stdint.h -%{_libdir}/gcc/*/*/include/stdint-gcc.h -%{_libdir}/gcc/*/*/include/syslimits.h -%{_libdir}/gcc/*/*/include/unwind.h -%{_libdir}/gcc/*/*/include/varargs.h +%dir %{_libdir}/gcc/%{_target_platform} +%dir %{gcclibdir} +%{gcclibdir}/libgcc.a +%{gcclibdir}/libgcc_eh.a +%{gcclibdir}/libgcov.a +%{gcclibdir}/specs +%{gcclibdir}/crt*.o +%attr(755,root,root) %{gcclibdir}/cc1 +%attr(755,root,root) %{gcclibdir}/collect2 +%attr(755,root,root) %{gcclibdir}/lto-wrapper +%attr(755,root,root) %{gcclibdir}/lto1 +%attr(755,root,root) %{gcclibdir}/liblto_plugin.so* +%{gcclibdir}/plugin +%dir %{gcclibdir}/include +%dir %{gcclibdir}/include/ssp +%{gcclibdir}/include/ssp/*.h +%{gcclibdir}/include/float.h +%{gcclibdir}/include/iso646.h +%{gcclibdir}/include/limits.h +%{gcclibdir}/include/stdarg.h +%{gcclibdir}/include/stdbool.h +%{gcclibdir}/include/stddef.h +%{gcclibdir}/include/stdfix.h +%{gcclibdir}/include/stdint.h +%{gcclibdir}/include/stdint-gcc.h +%{gcclibdir}/include/syslimits.h +%{gcclibdir}/include/unwind.h +%{gcclibdir}/include/varargs.h %ifarch %{ix86} %{x8664} -%{_libdir}/gcc/*/*/include/abmintrin.h -%{_libdir}/gcc/*/*/include/ammintrin.h -%{_libdir}/gcc/*/*/include/avxintrin.h -%{_libdir}/gcc/*/*/include/bmmintrin.h -%{_libdir}/gcc/*/*/include/cpuid.h -%{_libdir}/gcc/*/*/include/cross-stdarg.h -%{_libdir}/gcc/*/*/include/emmintrin.h -%{_libdir}/gcc/*/*/include/fma4intrin.h -%{_libdir}/gcc/*/*/include/ia32intrin.h -%{_libdir}/gcc/*/*/include/immintrin.h -%{_libdir}/gcc/*/*/include/lwpintrin.h -%{_libdir}/gcc/*/*/include/mm3dnow.h -%{_libdir}/gcc/*/*/include/mm_malloc.h -%{_libdir}/gcc/*/*/include/mmintrin.h -%{_libdir}/gcc/*/*/include/nmmintrin.h -%{_libdir}/gcc/*/*/include/popcntintrin.h -%{_libdir}/gcc/*/*/include/pmmintrin.h -%{_libdir}/gcc/*/*/include/smmintrin.h -%{_libdir}/gcc/*/*/include/tmmintrin.h -%{_libdir}/gcc/*/*/include/wmmintrin.h -%{_libdir}/gcc/*/*/include/x86intrin.h -%{_libdir}/gcc/*/*/include/xmmintrin.h -%{_libdir}/gcc/*/*/include/xopintrin.h -%endif -%ifarch powerpc ppc ppc64 -%{_libdir}/gcc/*/*/include/altivec.h -%{_libdir}/gcc/*/*/include/paired.h -%{_libdir}/gcc/*/*/include/ppc-asm.h -%{_libdir}/gcc/*/*/include/ppu_intrinsics.h -%{_libdir}/gcc/*/*/include/si2vmx.h -%{_libdir}/gcc/*/*/include/spe.h -%{_libdir}/gcc/*/*/include/spu2vmx.h -%{_libdir}/gcc/*/*/include/vec_types.h +%{gcclibdir}/include/abmintrin.h +%{gcclibdir}/include/ammintrin.h +%{gcclibdir}/include/avxintrin.h +%{gcclibdir}/include/bmiintrin.h +%{gcclibdir}/include/bmmintrin.h +%{gcclibdir}/include/cpuid.h +%{gcclibdir}/include/cross-stdarg.h +%{gcclibdir}/include/emmintrin.h +%{gcclibdir}/include/fma4intrin.h +%{gcclibdir}/include/ia32intrin.h +%{gcclibdir}/include/immintrin.h +%{gcclibdir}/include/lwpintrin.h +%{gcclibdir}/include/mm3dnow.h +%{gcclibdir}/include/mm_malloc.h +%{gcclibdir}/include/mmintrin.h +%{gcclibdir}/include/nmmintrin.h +%{gcclibdir}/include/popcntintrin.h +%{gcclibdir}/include/pmmintrin.h +%{gcclibdir}/include/smmintrin.h +%{gcclibdir}/include/tbmintrin.h +%{gcclibdir}/include/tmmintrin.h +%{gcclibdir}/include/wmmintrin.h +%{gcclibdir}/include/x86intrin.h +%{gcclibdir}/include/xmmintrin.h +%{gcclibdir}/include/xopintrin.h +%endif +%ifarch arm +%{gcclibdir}/include/arm_neon.h +%{gcclibdir}/include/mmintrin.h +%endif +%ifarch ia64 +%{gcclibdir}/include/ia64intrin.h +%endif +%ifarch m68k +%{gcclibdir}/include/math-68881.h +%endif +%ifarch mips +%{gcclibdir}/include/loongson.h %endif %if %{with multilib} %files multilib %defattr(644,root,root,755) %attr(755,root,root) %{_slibdir32}/libgcc_s.so -%dir %{_libdir}/gcc/*/*/32 -%{_libdir}/gcc/*/*/32/crt*.o -%{_libdir}/gcc/*/*/32/libgcc.a -%{_libdir}/gcc/*/*/32/libgcc_eh.a -%{_libdir}/gcc/*/*/32/libgcov.a +%dir %{gcclibdir}/32 +%{gcclibdir}/32/crt*.o +%{gcclibdir}/32/libgcc.a +%{gcclibdir}/32/libgcc_eh.a +%{gcclibdir}/32/libgcov.a %attr(755,root,root) %{_libdir32}/libssp.so %{_libdir32}/libssp.la %{_libdir32}/libssp.a @@ -1700,8 +1978,8 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libgomp.so %{_libdir}/libgomp.la %{_libdir}/libgomp.spec -%{_libdir}/gcc/*/*/finclude -%{_libdir}/gcc/*/*/include/omp.h +%{gcclibdir}/finclude +%{gcclibdir}/include/omp.h %{_infodir}/libgomp.info* %if %{with multilib} @@ -1746,7 +2024,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libmudflapth.so %{_libdir}/libmudflap.la %{_libdir}/libmudflapth.la -%{_libdir}/gcc/*/*/include/mf-runtime.h +%{gcclibdir}/include/mf-runtime.h %if %{with multilib} %files -n libmudflap-multilib-devel @@ -1782,13 +2060,13 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/libgnarl.so %attr(755,root,root) %{_libdir}/libgnat-*.so %attr(755,root,root) %{_libdir}/libgnat.so -%attr(755,root,root) %{_libdir}/gcc/*/*/gnat1 -%{_libdir}/gcc/*/*/adainclude -%dir %{_libdir}/gcc/*/*/adalib -%{_libdir}/gcc/*/*/adalib/*.ali -%{_libdir}/gcc/*/*/adalib/g-trasym.o +%attr(755,root,root) %{gcclibdir}/gnat1 +%{gcclibdir}/adainclude +%dir %{gcclibdir}/adalib +%{gcclibdir}/adalib/*.ali +%{gcclibdir}/adalib/g-trasym.o %ifarch %{ix86} %{x8664} -%{_libdir}/gcc/*/*/adalib/libgmem.a +%{gcclibdir}/adalib/libgmem.a %endif %{_infodir}/gnat-style.info* %{_infodir}/gnat_rm.info* @@ -1801,12 +2079,12 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir32}/libgnarl.so %attr(755,root,root) %{_libdir32}/libgnat-*.so %attr(755,root,root) %{_libdir32}/libgnat.so -%{_libdir}/gcc/*/*/32/adainclude -%dir %{_libdir}/gcc/*/*/32/adalib -%{_libdir}/gcc/*/*/32/adalib/*.ali -%{_libdir}/gcc/*/*/32/adalib/g-trasym.o +%{gcclibdir}/32/adainclude +%dir %{gcclibdir}/32/adalib +%{gcclibdir}/32/adalib/*.ali +%{gcclibdir}/32/adalib/g-trasym.o %ifarch %{ix86} %{x8664} -%{_libdir}/gcc/*/*/32/adalib/libgmem.a +%{gcclibdir}/32/adalib/libgmem.a %endif %endif @@ -1828,16 +2106,16 @@ rm -rf $RPM_BUILD_ROOT %files -n libgnat-static %defattr(644,root,root,755) -%{_libdir}/gcc/*/*/adalib/libgnala.a -%{_libdir}/gcc/*/*/adalib/libgnarl.a -%{_libdir}/gcc/*/*/adalib/libgnat.a +%{gcclibdir}/adalib/libgnala.a +%{gcclibdir}/adalib/libgnarl.a +%{gcclibdir}/adalib/libgnat.a %if %{with multilib} %files -n libgnat-multilib-static %defattr(644,root,root,755) -%{_libdir}/gcc/*/*/32/adalib/libgnala.a -%{_libdir}/gcc/*/*/32/adalib/libgnarl.a -%{_libdir}/gcc/*/*/32/adalib/libgnat.a +%{gcclibdir}/32/adalib/libgnala.a +%{gcclibdir}/32/adalib/libgnarl.a +%{gcclibdir}/32/adalib/libgnat.a %endif %endif @@ -1849,7 +2127,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/*-g++ %attr(755,root,root) %{_bindir}/c++ %attr(755,root,root) %{_bindir}/*-c++ -%attr(755,root,root) %{_libdir}/gcc/*/*/cc1plus +%attr(755,root,root) %{gcclibdir}/cc1plus %{_libdir}/libsupc++.la %{_libdir}/libsupc++.a %{_mandir}/man1/g++.1* @@ -1881,7 +2159,7 @@ rm -rf $RPM_BUILD_ROOT %{py_sitescriptdir}/libstdcxx/*.py[co] %dir %{py_sitescriptdir}/libstdcxx/v6 %{py_sitescriptdir}/libstdcxx/v6/*.py[co] -%{_datadir}/gdb/auto-load/usr/lib*/libstdc++.so.6.0.14-gdb.py +%{_datadir}/gdb/auto-load/usr/lib*/libstdc++.so.6.0.16-gdb.py %endif %files -n libstdc++-devel @@ -1933,11 +2211,12 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/g95 %attr(755,root,root) %{_bindir}/gfortran %attr(755,root,root) %{_bindir}/*-gfortran -%attr(755,root,root) %{_libdir}/gcc/*/*/f951 +%attr(755,root,root) %{gcclibdir}/f951 %attr(755,root,root) %{_libdir}/libgfortran.so +%{_libdir}/libgfortran.spec %{_libdir}/libgfortran.la -%{_libdir}/gcc/*/*/libgfortranbegin.la -%{_libdir}/gcc/*/*/libgfortranbegin.a +%{gcclibdir}/libgfortranbegin.la +%{gcclibdir}/libgfortranbegin.a %{_infodir}/gfortran.info* %{_mandir}/man1/g95.1* %{_mandir}/man1/gfortran.1* @@ -1946,9 +2225,10 @@ rm -rf $RPM_BUILD_ROOT %files fortran-multilib %defattr(644,root,root,755) %attr(755,root,root) %{_libdir32}/libgfortran.so +%{_libdir32}/libgfortran.spec %{_libdir32}/libgfortran.la -%{_libdir}/gcc/*/*/32/libgfortranbegin.la -%{_libdir}/gcc/*/*/32/libgfortranbegin.a +%{gcclibdir}/32/libgfortranbegin.la +%{gcclibdir}/32/libgfortranbegin.a %endif %files -n libgfortran @@ -1973,6 +2253,43 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{_libdir32}/libgfortran.a %endif + +%files -n libquadmath +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libquadmath.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libquadmath.so.0 + +%if %{with multilib} +%files -n libquadmath-multilib +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libquadmath.so.*.*.* +%attr(755,root,root) %ghost %{_libdir32}/libquadmath.so.0 +%endif + +%files -n libquadmath-devel +%defattr(644,root,root,755) +%{gcclibdir}/include/quadmath.h +%{gcclibdir}/include/quadmath_weak.h +%attr(755,root,root) %{_libdir}/libquadmath.so +%{_libdir}/libquadmath.la +%{_infodir}/libquadmath.info* + +%if %{with multilib} +%files -n libquadmath-multilib-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libquadmath.so +%{_libdir32}/libquadmath.la +%endif + +%files -n libquadmath-static +%defattr(644,root,root,755) +%{_libdir}/libquadmath.a + +%if %{with multilib} +%files -n libquadmath-multilib-static +%defattr(644,root,root,755) +%{_libdir32}/libquadmath.a +%endif %endif %if %{with java} @@ -1999,9 +2316,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/jv-convert %attr(755,root,root) %{_bindir}/rebuild-gcj-db %attr(755,root,root) %{_bindir}/*-gcj -%attr(755,root,root) %{_libdir}/gcc/*/*/ecj1 -%attr(755,root,root) %{_libdir}/gcc/*/*/jc1 -%attr(755,root,root) %{_libdir}/gcc/*/*/jvgenmain +%attr(755,root,root) %{gcclibdir}/ecj1 +%attr(755,root,root) %{gcclibdir}/jc1 +%attr(755,root,root) %{gcclibdir}/jvgenmain %{_infodir}/cp-tools.info* %{_infodir}/gcj.info* %{_mandir}/man1/gappletviewer.1* @@ -2024,6 +2341,15 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/jv-convert.1* %{_mandir}/man1/rebuild-gcj-db* +%if %{with python} +%files java-aotcompile +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/aot-compile +%dir %{py_sitescriptdir}/libjava +%{py_sitescriptdir}/libjava/*.py[co] +%{_mandir}/man1/aot-compile.1* +%endif + %files -n libgcj %defattr(644,root,root,755) %doc libjava/{ChangeLog,LIBGCJ_LICENSE,NEWS,README,THANKS} @@ -2079,12 +2405,12 @@ rm -rf $RPM_BUILD_ROOT %{?with_qt:%{_libdir}/%{gcjdbexecdir}/libqtpeer.la} %{?with_mozilla:%{_libdir}/%{gcjdbexecdir}/libgcjwebplugin.la} %{_libdir}/%{gcjdbexecdir}/libxmlj.la -%{_libdir}/gcc/*/*/include/gcj -%{_libdir}/gcc/*/*/include/jawt.h -%{_libdir}/gcc/*/*/include/jawt_md.h -%{_libdir}/gcc/*/*/include/jni.h -%{_libdir}/gcc/*/*/include/jni_md.h -%{_libdir}/gcc/*/*/include/jvmpi.h +%{gcclibdir}/include/gcj +%{gcclibdir}/include/jawt.h +%{gcclibdir}/include/jawt_md.h +%{gcclibdir}/include/jni.h +%{gcclibdir}/include/jni_md.h +%{gcclibdir}/include/jvmpi.h %{_includedir}/c++/%{version}/java %{_includedir}/c++/%{version}/javax %{_includedir}/c++/%{version}/gcj @@ -2119,8 +2445,9 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libffi.so %{_libdir}/libffi.la -%{_libdir}/gcc/*/*/include/ffi.h -%{_libdir}/gcc/*/*/include/ffitarget.h +%{gcclibdir}/include/ffi.h +%{gcclibdir}/include/ffitarget.h +%{_pkgconfigdir}/libffi.pc %{_mandir}/man3/ffi*.3* %if %{with multilib} @@ -2128,6 +2455,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_libdir32}/libffi.so %{_libdir32}/libffi.la +%{_pkgconfigdir32}/libffi.pc %endif %files -n libffi-static @@ -2144,11 +2472,18 @@ rm -rf $RPM_BUILD_ROOT %if %{with objc} %files objc %defattr(644,root,root,755) -%doc gcc/objc/README -%attr(755,root,root) %{_libdir}/gcc/*/*/cc1obj +%doc gcc/objc/README.libobjc +%attr(755,root,root) %{gcclibdir}/cc1obj %attr(755,root,root) %{_libdir}/libobjc.so %{_libdir}/libobjc.la -%{_libdir}/gcc/*/*/include/objc +%{gcclibdir}/include/objc + +%if %{with objcxx} +%files objc++ +%defattr(644,root,root,755) +%doc gcc/objcp/ChangeLog +%attr(755,root,root) %{gcclibdir}/cc1objplus +%endif %if %{with multilib} %files objc-multilib @@ -2161,13 +2496,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc libobjc/{ChangeLog,README*} %attr(755,root,root) %{_libdir}/libobjc.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libobjc.so.2 +%attr(755,root,root) %ghost %{_libdir}/libobjc.so.3 %if %{with multilib} %files -n libobjc-multilib %defattr(644,root,root,755) %attr(755,root,root) %{_libdir32}/libobjc.so.*.*.* -%attr(755,root,root) %ghost %{_libdir32}/libobjc.so.2 +%attr(755,root,root) %ghost %{_libdir32}/libobjc.so.3 %endif %files -n libobjc-static @@ -2181,9 +2516,58 @@ rm -rf $RPM_BUILD_ROOT %endif %endif -%if %{with objcxx} -%files objc++ +%if %{with go} +%files go %defattr(644,root,root,755) -%doc gcc/objcp/ChangeLog -%attr(755,root,root) %{_libdir}/gcc/*/*/cc1objplus +%doc gcc/go/gofrontend/{LICENSE,PATENTS,README} +%attr(755,root,root) %{_bindir}/gccgo +%attr(755,root,root) %{gcclibdir}/go1 +%dir %{_libdir}/go +%{_libdir}/go/%{version} +%{_mandir}/man1/gccgo.1* +%{_infodir}/gccgo.info* + +%if %{with multilib} +%files go-multilib +%defattr(644,root,root,755) +%dir %{_libdir32}/go +%{_libdir32}/go/%{version} +%endif + +%files -n libgo +%defattr(644,root,root,755) +%doc libgo/{LICENSE,PATENTS,README} +%attr(755,root,root) %{_libdir}/libgo.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libgo.so.0 + +%if %{with multilib} +%files -n libgo-multilib +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libgo.so.*.*.* +%attr(755,root,root) %ghost %{_libdir32}/libgo.so.0 +%endif + +%files -n libgo-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libgo.so +%{_libdir}/libgo.la +%{_libdir}/libgobegin.a + +%if %{with multilib} +%files -n libgo-multilib-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libgo.so +%{_libdir32}/libgo.la +%{_libdir32}/libgobegin.a +%endif + +%files -n libgo-static +%defattr(644,root,root,755) +%{_libdir}/libgo.a + +%if %{with multilib} +%files -n libgo-multilib-static +%defattr(644,root,root,755) +%{_libdir32}/libgo.a +%endif %endif -- 2.37.3