[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/gcc/FC-4 gcc4-fortran-bzbn.patch, NONE, 1.1 gcc4-fortran-data-range.patch, NONE, 1.1 gcc4-fortran-inf.patch, NONE, 1.1 gcc4-ia64-stack-protector.patch, NONE, 1.1 gcc4-io_invalid-test.patch, NONE, 1.1 gcc4-java-rh163099.patch, NONE, 1.1 gcc4-libjava-ia64-backtrace.patch, NONE, 1.1 gcc4-libltdl-multilib.patch, NONE, 1.1 gcc4-libstdc++-pr22309.patch, NONE, 1.1 gcc4-pr17965.patch, NONE, 1.1 gcc4-pr20606.patch, NONE, 1.1 gcc4-pr21828.patch, NONE, 1.1 gcc4-pr22052.patch, NONE, 1.1 gcc4-pr22167.patch, NONE, 1.1 gcc4-rh163058.patch, NONE, 1.1 gcc4-s390-stack-protector.patch, NONE, 1.1 gcc4-stack-protector.patch, NONE, 1.1 gcc4-vsb-stack.patch, NONE, 1.1 .cvsignore, 1.94, 1.95 gcc4.spec, 1.45, 1.46 sources, 1.96, 1.97 gcc4-ada-target-bit.patch, 1.1, NONE gcc4-c++-pr19317.patch, 1.2, NONE gcc4-gfortran-namelist.patch, 1.1, NONE gcc4-po-fixes.patch, 1.2, NONE gcc4-pr19005-test.patch, 1.1, NONE gcc4-pr20249.patch, 1.5, NONE gcc4-pr20490.patch, 1.3, NONE gcc4-pr21492.patch, 1.1, NONE
- From: fedora-cvs-commits redhat com
- To: fedora-cvs-commits redhat com
- Subject: rpms/gcc/FC-4 gcc4-fortran-bzbn.patch, NONE, 1.1 gcc4-fortran-data-range.patch, NONE, 1.1 gcc4-fortran-inf.patch, NONE, 1.1 gcc4-ia64-stack-protector.patch, NONE, 1.1 gcc4-io_invalid-test.patch, NONE, 1.1 gcc4-java-rh163099.patch, NONE, 1.1 gcc4-libjava-ia64-backtrace.patch, NONE, 1.1 gcc4-libltdl-multilib.patch, NONE, 1.1 gcc4-libstdc++-pr22309.patch, NONE, 1.1 gcc4-pr17965.patch, NONE, 1.1 gcc4-pr20606.patch, NONE, 1.1 gcc4-pr21828.patch, NONE, 1.1 gcc4-pr22052.patch, NONE, 1.1 gcc4-pr22167.patch, NONE, 1.1 gcc4-rh163058.patch, NONE, 1.1 gcc4-s390-stack-protector.patch, NONE, 1.1 gcc4-stack-protector.patch, NONE, 1.1 gcc4-vsb-stack.patch, NONE, 1.1 .cvsignore, 1.94, 1.95 gcc4.spec, 1.45, 1.46 sources, 1.96, 1.97 gcc4-ada-target-bit.patch, 1.1, NONE gcc4-c++-pr19317.patch, 1.2, NONE gcc4-gfortran-namelist.patch, 1.1, NONE gcc4-po-fixes.patch, 1.2, NONE gcc4-pr19005-test.patch, 1.1, NONE gcc4-pr20249.patch, 1.5, NONE gcc4-pr20490.patch, 1.3, NONE gcc4-pr21492.patch, 1.1, NONE
- Date: Thu, 21 Jul 2005 03:22:29 -0400
Author: jakub
Update of /cvs/dist/rpms/gcc/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv24335/FC-4
Modified Files:
.cvsignore gcc4.spec sources
Added Files:
gcc4-fortran-bzbn.patch gcc4-fortran-data-range.patch
gcc4-fortran-inf.patch gcc4-ia64-stack-protector.patch
gcc4-io_invalid-test.patch gcc4-java-rh163099.patch
gcc4-libjava-ia64-backtrace.patch gcc4-libltdl-multilib.patch
gcc4-libstdc++-pr22309.patch gcc4-pr17965.patch
gcc4-pr20606.patch gcc4-pr21828.patch gcc4-pr22052.patch
gcc4-pr22167.patch gcc4-rh163058.patch
gcc4-s390-stack-protector.patch gcc4-stack-protector.patch
gcc4-vsb-stack.patch
Removed Files:
gcc4-ada-target-bit.patch gcc4-c++-pr19317.patch
gcc4-gfortran-namelist.patch gcc4-po-fixes.patch
gcc4-pr19005-test.patch gcc4-pr20249.patch gcc4-pr20490.patch
gcc4-pr21492.patch
Log Message:
auto-import gcc-4.0.1-3.fc4 on branch FC-4 from gcc-4.0.1-3.fc4.src.rpm
gcc4-fortran-bzbn.patch:
gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 | 14 +++++++
libgfortran/io/read.c | 48 +++++++++++++++++++--------
libgfortran/io/unit.c | 6 +--
3 files changed, 51 insertions(+), 17 deletions(-)
--- NEW FILE gcc4-fortran-bzbn.patch ---
2005-07-19 Jerry DeLisle <jvdelisle verizon net>
* io/read.c (read_f): Fix reading of trailing blanks in
exponents related to BZ and BN format specifier logic.
* io/unit.c (init_units): Change default setting of u->flags.blank
to BLANK_UNSPECIFIED for stdin, stdout, and stderr.
--- libgfortran/io/read.c.jj 2005-07-14 19:52:29.000000000 +0200
+++ libgfortran/io/read.c 2005-07-20 17:40:20.000000000 +0200
@@ -651,24 +651,46 @@ read_f (fnode * f, char *dest, int lengt
p++;
w--;
- while (w > 0)
+ if (g.blank_status == BLANK_UNSPECIFIED) /* Normal processing of exponent */
{
- if (*p == ' ')
+ while (w > 0 && isdigit (*p))
{
- if (g.blank_status == BLANK_ZERO) *p = '0';
- if (g.blank_status == BLANK_NULL)
+ exponent = 10 * exponent + *p - '0';
+ p++;
+ w--;
+ }
+
+ /* Only allow trailing blanks */
+
+ while (w > 0)
+ {
+ if (*p != ' ')
+ goto bad_float;
+ p++;
+ w--;
+ }
+ }
+ else /* BZ or BN status is enabled */
+ {
+ while (w > 0)
+ {
+ if (*p == ' ')
{
- p++;
- w--;
- continue;
+ if (g.blank_status == BLANK_ZERO) *p = '0';
+ if (g.blank_status == BLANK_NULL)
+ {
+ p++;
+ w--;
+ continue;
+ }
}
+ else if (!isdigit (*p))
+ goto bad_float;
+
+ exponent = 10 * exponent + *p - '0';
+ p++;
+ w--;
}
- if (!isdigit (*p))
- goto bad_float;
-
- exponent = 10 * exponent + *p - '0';
- p++;
- w--;
}
exponent = exponent * exponent_sign;
--- libgfortran/io/unit.c.jj 2005-07-14 19:52:29.000000000 +0200
+++ libgfortran/io/unit.c 2005-07-20 17:40:20.000000000 +0200
@@ -304,7 +304,7 @@ init_units (void)
u->flags.access = ACCESS_SEQUENTIAL;
u->flags.form = FORM_FORMATTED;
u->flags.status = STATUS_OLD;
- u->flags.blank = BLANK_ZERO;
+ u->flags.blank = BLANK_UNSPECIFIED;
u->flags.position = POSITION_ASIS;
u->recl = options.default_recl;
@@ -326,7 +326,7 @@ init_units (void)
u->flags.access = ACCESS_SEQUENTIAL;
u->flags.form = FORM_FORMATTED;
u->flags.status = STATUS_OLD;
- u->flags.blank = BLANK_ZERO;
+ u->flags.blank = BLANK_UNSPECIFIED;
u->flags.position = POSITION_ASIS;
u->recl = options.default_recl;
@@ -348,7 +348,7 @@ init_units (void)
u->flags.access = ACCESS_SEQUENTIAL;
u->flags.form = FORM_FORMATTED;
u->flags.status = STATUS_OLD;
- u->flags.blank = BLANK_ZERO;
+ u->flags.blank = BLANK_UNSPECIFIED;
u->flags.position = POSITION_ASIS;
u->recl = options.default_recl;
--- gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90.jj 2005-07-14 19:58:42.000000000 +0200
+++ gcc/testsuite/gfortran.dg/fmt_read_bz_bn.f90 2005-07-20 17:41:19.000000000 +0200
@@ -6,12 +6,15 @@ program test_bn
integer I1(2,2), I2(2,2,2)
real A1(5)
+real*8 A2(0:3)
character*80 :: IDATA1="111 2 2 3 3. 3E-1 44 5 5 6 . 67 . 78 8. 8E-1"
character*80 :: IDATA2="2345 1 34512 45123 51234 2345 1 34512 45123 5"
+character*80 :: IDATA3="-8.0D0 1.0D-4 0.50D0 0.250D0"
character*80 :: ODATA=""
character*80 :: CORRECT1=" 1110 2020 .30303E-07 44 55 6.6 70.07 .888E+01"
character*80 :: CORRECT2="23450 10345. 12.45 1235 1234 2345 1345. 12.45 1235"
-
+character*80 :: CORRECT3=" -0.8000000000D+01 0.1000000000D-03&
+ 0.5000000000D+00 0.2500000000D+00"
READ(IDATA1, 10) I1(1,2), IVI, A1(3), JVI, KVI, A1(2), AVS, A1(1)
10 FORMAT (BZ,(2I4, E10.1, BN, 2I4, F5.2, BZ, F5.2, BN, E10.1))
@@ -28,5 +31,14 @@ WRITE(ODATA, 40) I2(1,2,1), A1(3), AVS,
40 FORMAT (I5, F7.0, BZ, 1X, F5.2, 2(1X,I4),I5, F7.0, BZ, 1X, F5.2, 1X, I4)
if (ODATA /= CORRECT2) call abort
+ODATA=""
+
+READ(IDATA3, 50) A2
+50 FORMAT (4D8.0)
+
+WRITE(ODATA,60) A2
+60 FORMAT (4D20.10)
+
+if (ODATA /= CORRECT3) call abort
end program test_bn
gcc4-fortran-data-range.patch:
fortran/data.c | 15 ++++++++++-----
testsuite/gfortran.fortran-torture/execute/data_4.f90 | 6 ++++++
2 files changed, 16 insertions(+), 5 deletions(-)
--- NEW FILE gcc4-fortran-data-range.patch ---
2005-07-19 Jakub Jelinek <jakub redhat com>
PR fortran/20063
* data.c (gfc_assign_data_value_range): Call
create_character_initializer if last_ts is a character type.
* gfortran.fortran-torture/execute/data_4.f90: New test.
--- gcc/fortran/data.c.jj 2005-07-19 17:39:28.000000000 +0200
+++ gcc/fortran/data.c 2005-07-19 17:39:48.000000000 +0200
@@ -459,12 +459,17 @@ gfc_assign_data_value_range (gfc_expr *
last_con = con;
}
- /* We should never be overwriting an existing initializer. */
- gcc_assert (!init);
+ if (last_ts->type == BT_CHARACTER)
+ expr = create_character_intializer (init, last_ts, NULL, rvalue);
+ else
+ {
+ /* We should never be overwriting an existing initializer. */
+ gcc_assert (!init);
- expr = gfc_copy_expr (rvalue);
- if (!gfc_compare_types (&lvalue->ts, &expr->ts))
- gfc_convert_type (expr, &lvalue->ts, 0);
+ expr = gfc_copy_expr (rvalue);
+ if (!gfc_compare_types (&lvalue->ts, &expr->ts))
+ gfc_convert_type (expr, &lvalue->ts, 0);
+ }
if (last_con == NULL)
symbol->value = expr;
--- gcc/testsuite/gfortran.fortran-torture/execute/data_4.f90.jj 2005-07-19 17:48:25.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/data_4.f90 2005-07-19 15:10:45.000000000 +0200
@@ -0,0 +1,6 @@
+ CHARACTER*4 A(3),B(3),C(3)
+ DATA A /'A',"A",'A'/
+ DATA B /3*'A'/
+ DATA C /'A', 2*'A'/
+ IF (ANY(A.NE.B).OR.ANY(A.NE.C)) CALL ABORT
+ END
gcc4-fortran-inf.patch:
gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90 | 2 -
libgfortran/io/write.c | 11 ++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
--- NEW FILE gcc4-fortran-inf.patch ---
2005-07-19 Jerry DeLisle <jvdelisle verizon net>
* io/write.c (write_float): Change output for negative infinity
with field width of 3 to '***' per F95 and F2003 Standards.
--- libgfortran/io/write.c.jj 2005-07-14 19:52:29.000000000 +0200
+++ libgfortran/io/write.c 2005-07-20 17:32:05.000000000 +0200
@@ -714,8 +714,15 @@ write_float (fnode *f, const char *sourc
if (res != 0)
{
if (signbit(n))
- fin = '-';
- else
+ {
+ if (nb == 3)
+ {
+ memset (p, '*',nb);
+ return;
+ }
+ fin = '-';
+ }
+ else
fin = '+';
if (nb > 7)
--- gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90.jj 2004-06-12 14:50:54.000000000 +0200
+++ gcc/testsuite/gfortran.fortran-torture/execute/nan_inf_fmt.f90 2005-07-20 17:32:41.000000000 +0200
@@ -27,7 +27,7 @@
write(l,fmt=fmt)pos_inf
if (l.ne.'Inf') call abort
write(l,fmt=fmt)neg_inf
- if (l.ne.'Inf') call abort
+ if (l.ne.'***') call abort
write(l,fmt=fmt)nan
if (l.ne.'NaN') call abort
gcc4-ia64-stack-protector.patch:
ia64.c | 27 ++++++++++-----------------
ia64.h | 2 +-
ia64.md | 37 +++++++++++++++++++++++++++++++++++++
linux.h | 5 +++++
4 files changed, 53 insertions(+), 18 deletions(-)
--- NEW FILE gcc4-ia64-stack-protector.patch ---
2005-07-08 Jakub Jelinek <jakub redhat com>
* config/ia64/ia64.h (FRAME_GROWS_DOWNWARD): Define to 1 if
-fstack-protect.
* config/ia64/ia64.c (ia64_compute_frame_size): Make sure
size is a multiple of 16 if FRAME_GROWS_DOWNWARD.
(ia64_initial_elimination_offset): Support FRAME_GROWS_DOWNWARD
layout.
* config/ia64/linux.h (TARGET_LIBC_PROVIDES_SSP): Define.
* config/ia64/ia64.md (stack_protect_set, stack_protect_test): New
expanders.
--- gcc/config/ia64/linux.h.jj 2005-02-28 12:11:03.000000000 +0100
+++ gcc/config/ia64/linux.h 2005-07-08 18:19:37.000000000 +0200
@@ -58,3 +58,8 @@ do { \
#define LINK_EH_SPEC ""
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
+
+#ifdef TARGET_LIBC_PROVIDES_SSP
+/* IA-64 glibc provides __stack_chk_guard in [r13-8]. */
+#define TARGET_THREAD_SSP_OFFSET -8
+#endif
--- gcc/config/ia64/ia64.c.jj 2005-07-08 16:14:51.000000000 +0200
+++ gcc/config/ia64/ia64.c 2005-07-08 18:17:40.000000000 +0200
@@ -2165,6 +2165,9 @@ ia64_compute_frame_size (HOST_WIDE_INT s
else
pretend_args_size = current_function_pretend_args_size;
+ if (FRAME_GROWS_DOWNWARD)
+ size = IA64_STACK_ALIGN (size);
+
total_size = (spill_size + extra_spill_size + size + pretend_args_size
+ current_function_outgoing_args_size);
total_size = IA64_STACK_ALIGN (total_size);
@@ -2189,28 +2192,18 @@ ia64_compute_frame_size (HOST_WIDE_INT s
HOST_WIDE_INT
ia64_initial_elimination_offset (int from, int to)
{
- HOST_WIDE_INT offset;
+ HOST_WIDE_INT offset, size = get_frame_size ();
- ia64_compute_frame_size (get_frame_size ());
+ ia64_compute_frame_size (size);
switch (from)
{
case FRAME_POINTER_REGNUM:
+ offset = FRAME_GROWS_DOWNWARD ? IA64_STACK_ALIGN (size) : 0;
+ if (!current_function_is_leaf)
+ offset += 16 + current_function_outgoing_args_size;
if (to == HARD_FRAME_POINTER_REGNUM)
- {
- if (current_function_is_leaf)
- offset = -current_frame_info.total_size;
- else
- offset = -(current_frame_info.total_size
- - current_function_outgoing_args_size - 16);
- }
- else if (to == STACK_POINTER_REGNUM)
- {
- if (current_function_is_leaf)
- offset = 0;
- else
- offset = 16 + current_function_outgoing_args_size;
- }
- else
+ offset -= current_frame_info.total_size;
+ else if (to != STACK_POINTER_REGNUM)
abort ();
break;
--- gcc/config/ia64/ia64.md.jj 2005-05-16 23:32:52.000000000 +0200
+++ gcc/config/ia64/ia64.md 2005-07-08 18:39:59.000000000 +0200
@@ -6248,5 +6248,42 @@
"addp4 %0 = %1, %2"
[(set_attr "itanium_class" "ialu")])
+;;
+;; Stack guard expanders
+
+(define_expand "stack_protect_set"
+ [(set (match_operand 0 "memory_operand" "")
+ (match_operand 1 "memory_operand" ""))]
+ ""
+{
+#ifdef TARGET_THREAD_SSP_OFFSET
+ rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
+ rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx,
+ GEN_INT (TARGET_THREAD_SSP_OFFSET)));
+ MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]);
+ operands[1] = canary;
+#endif
+ emit_move_insn (operands[0], operands[1]);
+ DONE;
+})
+
+(define_expand "stack_protect_test"
+ [(match_operand 0 "memory_operand" "")
+ (match_operand 1 "memory_operand" "")
+ (match_operand 2 "" "")]
+ ""
+{
+#ifdef TARGET_THREAD_SSP_OFFSET
+ rtx thread_pointer_rtx = gen_rtx_REG (Pmode, 13);
+ rtx canary = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, thread_pointer_rtx,
+ GEN_INT (TARGET_THREAD_SSP_OFFSET)));
+ MEM_VOLATILE_P (canary) = MEM_VOLATILE_P (operands[1]);
+ operands[1] = canary;
+#endif
+ emit_cmp_and_jump_insns (operands[0], operands[1], EQ, NULL_RTX,
+ ptr_mode, 1, operands[2]);
+ DONE;
+})
+
;; Vector operations
(include "vect.md")
--- gcc/config/ia64/ia64.h.jj 2005-07-08 16:36:20.000000000 +0200
+++ gcc/config/ia64/ia64.h 2005-07-08 18:11:34.000000000 +0200
@@ -1120,7 +1120,7 @@ enum reg_class
/* Define this macro to non-zero if the addresses of local variable slots
are at negative offsets from the frame pointer. */
-#define FRAME_GROWS_DOWNWARD 0
+#define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0)
/* Offset from the frame pointer to the first local variable slot to
be allocated. */
gcc4-io_invalid-test.patch:
io_invalid_1.f90 | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE gcc4-io_invalid-test.patch ---
2005-07-04 Francois-Xavier Coudert <coudert clipper ens fr>
* gfortran.dg/io_invalid_1.f90: Fix expected error message.
--- gcc/testsuite/gfortran.dg/io_invalid_1.f90 3 Jul 2005 01:46:12 -0000 1.1
+++ gcc/testsuite/gfortran.dg/io_invalid_1.f90 4 Jul 2005 16:46:43 -0000 1.2
@@ -1,5 +1,5 @@
! { dg-do compile }
! PR fortran/20842
-WRITE(UNIT=6,END=999) 0 ! { dg-error "END tag .* is not compatible with output" }
+WRITE(UNIT=6,END=999) 0 ! { dg-error "END tag .* not allowed in output statement" }
999 CONTINUE
END
gcc4-java-rh163099.patch:
jvspec.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
--- NEW FILE gcc4-java-rh163099.patch ---
2005-07-13 Tom Tromey <tromey redhat com>
* jvspec.c (lang_specific_driver): Put filelist_filename first on
command line.
--- gcc/java/jvspec.c 12 Jul 2005 22:35:48 -0000 1.72
+++ gcc/java/jvspec.c 13 Jul 2005 15:21:33 -0000
@@ -458,7 +458,7 @@
if (filelist_file == NULL)
pfatal_with_name (filelist_filename);
num_args -= java_files_count + class_files_count + zip_files_count;
- num_args += 2; /* for the combined arg and "-xjava" */
+ num_args += 3; /* for the combined arg "-xjava", and "-xnone" */
}
/* If we know we don't have to do anything, bail now. */
#if 0
@@ -493,11 +493,23 @@
arglist = xmalloc ((num_args + 1) * sizeof (char *));
j = 0;
- for (i = 0; i < argc; i++, j++)
+ arglist[j++] = argv[0];
+
+ if (combine_inputs || indirect_files_count > 0)
+ arglist[j++] = "-ffilelist-file";
+
+ if (combine_inputs)
+ {
+ arglist[j++] = "-xjava";
+ arglist[j++] = filelist_filename;
+ arglist[j++] = "-xnone";
+ }
+
+ for (i = 1; i < argc; i++, j++)
{
arglist[j] = argv[i];
- if ((args[i] & PARAM_ARG) || i == 0)
+ if ((args[i] & PARAM_ARG))
continue;
if ((args[i] & RESOURCE_FILE_ARG) != 0)
@@ -559,15 +571,10 @@
}
}
- if (combine_inputs || indirect_files_count > 0)
- arglist[j++] = "-ffilelist-file";
-
if (combine_inputs)
{
if (fclose (filelist_file))
pfatal_with_name (filelist_filename);
- arglist[j++] = "-xjava";
- arglist[j++] = filelist_filename;
}
/* If we saw no -O or -g option, default to -g1, for javac compatibility. */
gcc4-libjava-ia64-backtrace.patch:
configure | 3 ---
configure.ac | 3 ---
2 files changed, 6 deletions(-)
--- NEW FILE gcc4-libjava-ia64-backtrace.patch ---
2005-07-14 Jakub Jelinek <jakub redhat com>
* configure.ac (HAVE_BACKTRACE): Define even on ia64.
* configure: Rebuilt.
--- libjava/configure.ac.jj 2005-04-12 22:28:45.000000000 +0200
+++ libjava/configure.ac 2005-07-14 18:09:23.000000000 +0200
@@ -769,9 +769,6 @@ else
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
AC_CHECK_FUNC(backtrace, [
case "$host" in
- ia64-*-linux*)
- # Has broken backtrace()
- ;;
mips*-*-linux*)
# Has broken backtrace(), but we supply our own.
if test -d sysdep; then true; else mkdir -p sysdep; fi
--- libjava/configure.jj 2005-04-12 22:28:34.000000000 +0200
+++ libjava/configure 2005-07-14 18:11:07.000000000 +0200
@@ -9303,9 +9303,6 @@ echo "${ECHO_T}$ac_cv_func_backtrace" >&
if test $ac_cv_func_backtrace = yes; then
case "$host" in
- ia64-*-linux*)
- # Has broken backtrace()
- ;;
mips*-*-linux*)
# Has broken backtrace(), but we supply our own.
if test -d sysdep; then true; else mkdir -p sysdep; fi
gcc4-libltdl-multilib.patch:
acinclude.m4 | 18 ++++++++
configure | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 145 insertions(+)
--- NEW FILE gcc4-libltdl-multilib.patch ---
2005-06-17 Jakub Jelinek <jakub redhat com>
* acinclude.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Set
sys_lib_dlsearch_path_spec on bi-arch linux architectures
for 64-bit builds.
* configure: Rebuilt.
--- libjava/libltdl/acinclude.m4.jj 2005-03-11 14:02:06.000000000 +0100
+++ libjava/libltdl/acinclude.m4 2005-06-17 14:37:06.000000000 +0200
@@ -1434,6 +1434,24 @@ linux*)
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
+
+ # Find out which ABI we are using.
+ case "$host_cpu" in
+ x86_64*|s390*|sparc*|ppc*|powerpc*)
+ AC_LANG_PUSH(C)
+ lt_linux_biarch_save_CC="$CC"
+ CC="${LTCC-$CC}"
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *64-bit*) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64";;
+ esac
+ fi
+ rm -rf conftest*
+ CC="$lt_linux_biarch_save_CC"
+ AC_LANG_POP
+ ;;
+ esac
;;
netbsd*)
--- libjava/libltdl/configure.jj 2005-03-11 14:02:07.000000000 +0100
+++ libjava/libltdl/configure 2005-06-17 14:37:11.000000000 +0200
@@ -8421,6 +8421,38 @@ linux*)
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
+
+ # Find out which ABI we are using.
+ case "$host_cpu" in
+ x86_64*|s390*|sparc*|ppc*|powerpc*)
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ lt_linux_biarch_save_CC="$CC"
+ CC="${LTCC-$CC}"
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case "`/usr/bin/file conftest.o`" in
+ *64-bit*) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64";;
+ esac
+ fi
+ rm -rf conftest*
+ CC="$lt_linux_biarch_save_CC"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ;;
+ esac
;;
netbsd*)
@@ -12071,6 +12103,38 @@ linux*)
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
+
+ # Find out which ABI we are using.
+ case "$host_cpu" in
+ x86_64*|s390*|sparc*|ppc*|powerpc*)
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ lt_linux_biarch_save_CC="$CC"
+ CC="${LTCC-$CC}"
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case "`/usr/bin/file conftest.o`" in
+ *64-bit*) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64";;
+ esac
+ fi
+ rm -rf conftest*
+ CC="$lt_linux_biarch_save_CC"
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ;;
+ esac
;;
netbsd*)
@@ -15156,6 +15220,37 @@ linux*)
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
+
+ # Find out which ABI we are using.
+ case "$host_cpu" in
+ x86_64*|s390*|sparc*|ppc*|powerpc*)
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ lt_linux_biarch_save_CC="$CC"
+ CC="${LTCC-$CC}"
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case "`/usr/bin/file conftest.o`" in
+ *64-bit*) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64";;
+ esac
+ fi
+ rm -rf conftest*
+ CC="$lt_linux_biarch_save_CC"
+ ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+ ;;
+ esac
;;
netbsd*)
@@ -17441,6 +17536,38 @@ linux*)
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
+
+ # Find out which ABI we are using.
+ case "$host_cpu" in
+ x86_64*|s390*|sparc*|ppc*|powerpc*)
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ lt_linux_biarch_save_CC="$CC"
+ CC="${LTCC-$CC}"
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case "`/usr/bin/file conftest.o`" in
+ *64-bit*) sys_lib_dlsearch_path_spec="/lib64 /usr/lib64";;
+ esac
+ fi
+ rm -rf conftest*
+ CC="$lt_linux_biarch_save_CC"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ;;
+ esac
;;
netbsd*)
gcc4-libstdc++-pr22309.patch:
mt_allocator.cc | 168 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 118 insertions(+), 50 deletions(-)
--- NEW FILE gcc4-libstdc++-pr22309.patch ---
2005-07-14 Jakub Jelinek <jakub redhat com>
PR libstdc++/22309
* src/mt_allocator.cc (__gnu_internal::freelist_mutex): Make static.
(__gnu_internal::__freelist_key): New type.
(__gnu_internal::freelist): New variable.
(__gnu_internal::_M_destroy_thread_key): New function.
(__gnu_cxx::__pool<true>::_M_destroy): Don't delete
_M_thread_freelist_initial.
(__gnu_cxx::__pool<true>::_M_initialize): Add unused attribute to __d
argument. Don't use _M_thread_freelist and _M_thread_freelist_initial
__pool<true> fields, instead use __gnu_cxx::freelist fields, call
gthread_key_create just once. Use
__gnu_internal::_M_destroy_thread_key as key destructor.
(__gnu_cxx::__pool<true>::_M_get_thread_id): Store size_t id rather than
_Thread_record* in the thread specific value. Don't use
_M_thread_freelist __pool<true> field, instead use __gnu_cxx::freelist
fields.
(__gnu_cxx::__pool<true>::_M_destroy_thread_key): Do nothing.
--- libstdc++-v3/src/mt_allocator.cc.jj 2004-10-17 17:22:03.000000000 +0200
+++ libstdc++-v3/src/mt_allocator.cc 2005-07-14 14:26:30.000000000 +0200
@@ -1,8 +1,8 @@
// Allocator details.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
-// This file is part of the GNU ISO C++ Librarbooly. This library is free
+// 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 2, or (at your option)
@@ -37,10 +37,39 @@
namespace __gnu_internal
{
- __glibcxx_mutex_define_initialized(freelist_mutex);
+ static __glibcxx_mutex_define_initialized(freelist_mutex);
#ifdef __GTHREADS
- __gthread_key_t freelist_key;
+ static struct __freelist
+ {
+ typedef __gnu_cxx::__pool<true>::_Thread_record _Thread_record;
+ _Thread_record* _M_thread_freelist;
+ _Thread_record* _M_thread_freelist_array;
+ size_t _M_max_threads;
+ __gthread_key_t _M_key;
+ ~__freelist()
+ {
+ if (_M_thread_freelist_array)
+ {
+ __gthread_key_delete (_M_key);
+ ::operator delete(static_cast<void*>(_M_thread_freelist_array));
+ }
+ }
+ } freelist
+ /* Ensure freelist is destructed last. */
+ __attribute__((init_priority (101)));
+
+ static void _M_destroy_thread_key (void* __id)
+ {
+ // Return this thread id record to front of thread_freelist.
+ typedef __gnu_cxx::__pool<true>::_Thread_record _Thread_record;
+ __gnu_cxx::lock sentry(__gnu_internal::freelist_mutex);
+ size_t _M_id = (size_t)__id;
+ _Thread_record* __tr
+ = &__gnu_internal::freelist._M_thread_freelist_array[_M_id - 1];
+ __tr->_M_next = __gnu_internal::freelist._M_thread_freelist;
+ __gnu_internal::freelist._M_thread_freelist = __tr;
+ }
#endif
}
@@ -194,7 +223,6 @@ namespace __gnu_cxx
::operator delete(__bin._M_used);
::operator delete(__bin._M_mutex);
}
- ::operator delete(_M_thread_freelist_initial);
}
else
{
@@ -386,8 +414,9 @@ namespace __gnu_cxx
return reinterpret_cast<char*>(__block) + __options._M_align;
}
- void
- __pool<true>::_M_initialize(__destroy_handler __d)
+ void
+ __pool<true>::_M_initialize(__destroy_handler __d
+ __attribute__((__unused__)))
{
// _M_force_new must not change after the first allocate(),
// which in turn calls this method, so if it's false, it's false
@@ -397,7 +426,7 @@ namespace __gnu_cxx
_M_init = true;
return;
}
-
+
// Create the bins.
// Calculate the number of bins required based on _M_max_bytes.
// _M_bin_size is statically-initialized to one.
@@ -433,29 +462,70 @@ namespace __gnu_cxx
// directly and have no need for this.
if (__gthread_active_p())
{
- const size_t __k = sizeof(_Thread_record) * _M_options._M_max_threads;
- __v = ::operator new(__k);
- _M_thread_freelist = static_cast<_Thread_record*>(__v);
- _M_thread_freelist_initial = __v;
-
- // NOTE! The first assignable thread id is 1 since the
- // global pool uses id 0
- size_t __i;
- for (__i = 1; __i < _M_options._M_max_threads; ++__i)
- {
- _Thread_record& __tr = _M_thread_freelist[__i - 1];
- __tr._M_next = &_M_thread_freelist[__i];
- __tr._M_id = __i;
- }
-
- // Set last record.
- _M_thread_freelist[__i - 1]._M_next = NULL;
- _M_thread_freelist[__i - 1]._M_id = __i;
-
- // Initialize per thread key to hold pointer to
- // _M_thread_freelist.
- __gthread_key_create(&__gnu_internal::freelist_key, __d);
-
+ {
+ __gnu_cxx::lock sentry(__gnu_internal::freelist_mutex);
+
+ if (!__gnu_internal::freelist._M_thread_freelist_array
+ || __gnu_internal::freelist._M_max_threads
+ < _M_options._M_max_threads)
+ {
+ const size_t __k = sizeof(_Thread_record)
+ * _M_options._M_max_threads;
+ __v = ::operator new(__k);
+ _Thread_record* _M_thread_freelist
+ = static_cast<_Thread_record*>(__v);
+
+ // NOTE! The first assignable thread id is 1 since the
+ // global pool uses id 0
+ size_t __i;
+ for (__i = 1; __i < _M_options._M_max_threads; ++__i)
+ {
+ _Thread_record& __tr = _M_thread_freelist[__i - 1];
+ __tr._M_next = &_M_thread_freelist[__i];
+ __tr._M_id = __i;
+ }
+
+ // Set last record.
+ _M_thread_freelist[__i - 1]._M_next = NULL;
+ _M_thread_freelist[__i - 1]._M_id = __i;
+
+ if (!__gnu_internal::freelist._M_thread_freelist_array)
+ {
+ // Initialize per thread key to hold pointer to
+ // _M_thread_freelist.
+ __gthread_key_create(&__gnu_internal::freelist._M_key,
+ __gnu_internal::_M_destroy_thread_key);
+ __gnu_internal::freelist._M_thread_freelist
+ = _M_thread_freelist;
+ }
+ else
+ {
+ _Thread_record* _M_old_freelist
+ = __gnu_internal::freelist._M_thread_freelist;
+ _Thread_record* _M_old_array
+ = __gnu_internal::freelist._M_thread_freelist_array;
+ __gnu_internal::freelist._M_thread_freelist
+ = &_M_thread_freelist[_M_old_freelist - _M_old_array];
+ while (_M_old_freelist)
+ {
+ size_t next_id;
+ if (_M_old_freelist->_M_next)
+ next_id = _M_old_freelist->_M_next - _M_old_array;
+ else
+ next_id = __gnu_internal::freelist._M_max_threads;
+ _M_thread_freelist[_M_old_freelist->_M_id - 1]._M_next
+ = &_M_thread_freelist[next_id];
+ _M_old_freelist = _M_old_freelist->_M_next;
+ }
+ ::operator delete(static_cast<void*>(_M_old_array));
+ }
+ __gnu_internal::freelist._M_thread_freelist_array
+ = _M_thread_freelist;
+ __gnu_internal::freelist._M_max_threads
+ = _M_options._M_max_threads;
+ }
+ }
+
const size_t __max_threads = _M_options._M_max_threads + 1;
for (size_t __n = 0; __n < _M_bin_size; ++__n)
{
@@ -514,23 +584,24 @@ namespace __gnu_cxx
// returns it's id.
if (__gthread_active_p())
{
- void* v = __gthread_getspecific(__gnu_internal::freelist_key);
- _Thread_record* __freelist_pos = static_cast<_Thread_record*>(v);
- if (__freelist_pos == NULL)
- {
- // Since _M_options._M_max_threads must be larger than
- // the theoretical max number of threads of the OS the
- // list can never be empty.
+ void* v = __gthread_getspecific(__gnu_internal::freelist._M_key);
+ size_t _M_id = (size_t)v;
+ if (_M_id == 0)
+ {
{
__gnu_cxx::lock sentry(__gnu_internal::freelist_mutex);
- __freelist_pos = _M_thread_freelist;
- _M_thread_freelist = _M_thread_freelist->_M_next;
+ if (__gnu_internal::freelist._M_thread_freelist)
+ {
+ _M_id = __gnu_internal::freelist._M_thread_freelist->_M_id;
+ __gnu_internal::freelist._M_thread_freelist
+ = __gnu_internal::freelist._M_thread_freelist->_M_next;
+ }
}
-
- __gthread_setspecific(__gnu_internal::freelist_key,
- static_cast<void*>(__freelist_pos));
+
+ __gthread_setspecific(__gnu_internal::freelist._M_key,
+ (void*)_M_id);
}
- return __freelist_pos->_M_id;
+ return _M_id >= _M_options._M_max_threads ? 0 : _M_id;
}
// Otherwise (no thread support or inactive) all requests are
@@ -538,14 +609,11 @@ namespace __gnu_cxx
return 0;
}
+ // Compatibility
void
- __pool<true>::_M_destroy_thread_key(void* __freelist_pos)
+ __pool<true>::_M_destroy_thread_key(void* __freelist_pos
+ __attribute__((__unused__)))
{
- // Return this thread id record to front of thread_freelist.
- __gnu_cxx::lock sentry(__gnu_internal::freelist_mutex);
- _Thread_record* __tr = static_cast<_Thread_record*>(__freelist_pos);
- __tr->_M_next = _M_thread_freelist;
- _M_thread_freelist = __tr;
}
#endif
gcc4-pr17965.patch:
calls.c | 38 ++++++++++++++++++++++++---
testsuite/gcc.c-torture/compile/20050622-1.c | 16 +++++++++++
2 files changed, 51 insertions(+), 3 deletions(-)
--- NEW FILE gcc4-pr17965.patch ---
2005-06-22 Jakub Jelinek <jakub redhat com>
PR middle-end/17965
* calls.c (expand_call, emit_library_call_value_1): Use xmalloc/free
instead of alloca for really big argument sizes.
* gcc.c-torture/compile/20050622-1.c: New test.
--- gcc/calls.c.jj 2005-05-16 09:44:21.000000000 +0200
+++ gcc/calls.c 2005-06-22 11:16:28.000000000 +0200
@@ -1864,6 +1864,7 @@ expand_call (tree exp, rtx target, int i
int initial_highest_arg_in_use = highest_outgoing_arg_in_use;
char *initial_stack_usage_map = stack_usage_map;
+ char *stack_usage_map_buf = NULL;
int old_stack_allocated;
@@ -2360,7 +2361,16 @@ expand_call (tree exp, rtx target, int i
highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use,
needed);
#endif
- stack_usage_map = alloca (highest_outgoing_arg_in_use);
+ if (highest_outgoing_arg_in_use >= 262144)
+ {
+ if (stack_usage_map_buf)
+ free (stack_usage_map_buf);
+ stack_usage_map_buf
+ = xmalloc (highest_outgoing_arg_in_use);
+ stack_usage_map = stack_usage_map_buf;
+ }
+ else
+ stack_usage_map = alloca (highest_outgoing_arg_in_use);
if (initial_highest_arg_in_use)
memcpy (stack_usage_map, initial_stack_usage_map,
@@ -2465,7 +2475,16 @@ expand_call (tree exp, rtx target, int i
= stack_arg_under_construction;
stack_arg_under_construction = 0;
/* Make a new map for the new argument list. */
- stack_usage_map = alloca (highest_outgoing_arg_in_use);
+ if (highest_outgoing_arg_in_use >= 262144)
+ {
+ if (stack_usage_map_buf)
+ free (stack_usage_map_buf);
+ stack_usage_map_buf
+ = xmalloc (highest_outgoing_arg_in_use);
+ stack_usage_map = stack_usage_map_buf;
+ }
+ else
+ stack_usage_map = alloca (highest_outgoing_arg_in_use);
memset (stack_usage_map, 0, highest_outgoing_arg_in_use);
highest_outgoing_arg_in_use = 0;
}
@@ -3019,6 +3038,9 @@ expand_call (tree exp, rtx target, int i
emit_move_insn (virtual_stack_dynamic_rtx, stack_pointer_rtx);
}
+ if (stack_usage_map_buf)
+ free (stack_usage_map_buf);
+
return target;
}
@@ -3213,6 +3235,7 @@ emit_library_call_value_1 (int retval, r
/* Size of the stack reserved for parameter registers. */
int initial_highest_arg_in_use = highest_outgoing_arg_in_use;
char *initial_stack_usage_map = stack_usage_map;
+ char *stack_usage_map_buf = NULL;
rtx struct_value = targetm.calls.struct_value_rtx (0, 0);
@@ -3491,7 +3514,13 @@ emit_library_call_value_1 (int retval, r
highest_outgoing_arg_in_use = MAX (initial_highest_arg_in_use,
needed);
#endif
- stack_usage_map = alloca (highest_outgoing_arg_in_use);
+ if (highest_outgoing_arg_in_use >= 262144)
+ {
+ stack_usage_map_buf = xmalloc (highest_outgoing_arg_in_use);
+ stack_usage_map = stack_usage_map_buf;
+ }
+ else
+ stack_usage_map = alloca (highest_outgoing_arg_in_use);
if (initial_highest_arg_in_use)
memcpy (stack_usage_map, initial_stack_usage_map,
@@ -3845,6 +3874,9 @@ emit_library_call_value_1 (int retval, r
stack_usage_map = initial_stack_usage_map;
}
+ if (stack_usage_map_buf)
+ free (stack_usage_map_buf);
+
return value;
}
--- gcc/testsuite/gcc.c-torture/compile/20050622-1.c.jj 2005-06-22 11:18:01.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/20050622-1.c 2005-06-22 11:23:02.000000000 +0200
@@ -0,0 +1,16 @@
+#if __SCHAR_MAX__ == 127 && __INT_MAX__ >= 2147483647
+struct S { char buf[72*1024*1024]; };
+#else
+struct S { char buf[64]; };
+#endif
+
+extern void bar (struct S);
+
+struct S s;
+
+int
+foo (void)
+{
+ bar (s);
+ return 0;
+}
gcc4-pr20606.patch:
except.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
--- NEW FILE gcc4-pr20606.patch ---
2005-07-14 Andrew Haley <aph redhat com>
* except.c (expand_end_java_handler): Insert an empty ASM_EXPR at
the start of each catch block.
--- gcc/java/except.c.jj 2005-05-04 00:56:46.000000000 +0200
+++ gcc/java/except.c 2005-07-19 18:11:39.000000000 +0200
@@ -496,11 +496,21 @@ expand_end_java_handler (struct eh_range
type = prepare_eh_table_type (type);
{
- tree catch_expr = build2 (CATCH_EXPR, void_type_node, type,
- build1 (GOTO_EXPR, void_type_node,
- TREE_VALUE (handler)));
- tree try_catch_expr = build2 (TRY_CATCH_EXPR, void_type_node,
- *get_stmts (), catch_expr);
+ tree goto_expr = build1 (GOTO_EXPR, void_type_node,
+ TREE_VALUE (handler));
+ /* Build an asm to prevent gcc from attempting to merge this
+ handler with the next basic block; this is a workaround for
+ a bug in cfgbuild.c. */
+ tree asm_expr = build (ASM_EXPR, void_type_node,
+ build_string (0, ""),
+ NULL_TREE, NULL_TREE, NULL_TREE);
+ tree compound = build2 (COMPOUND_EXPR, void_type_node,
+ asm_expr, goto_expr);
+ tree try_catch_expr
+ = build2 (TRY_CATCH_EXPR, void_type_node,
+ *get_stmts (),
+ build2 (CATCH_EXPR, void_type_node, type,
+ compound));
*get_stmts () = try_catch_expr;
}
}
gcc4-pr21828.patch:
testsuite/gcc.dg/debug/dwarf2/static-var1.c | 14 ++++++++++++++
toplev.c | 1 +
2 files changed, 15 insertions(+)
--- NEW FILE gcc4-pr21828.patch ---
2005-07-20 Jakub Jelinek <jakub redhat com>
PR debug/21828
* toplev.c (check_global_declarations): Don't set DECL_IGNORED_P
on still unemitted variables with static storage duration if
cgraph_optimize has not been called yet in unit at a time mode.
* gcc.dg/debug/dwarf2/static-var1.c: New test.
--- gcc/toplev.c.jj 2005-07-19 19:06:07.000000000 +0200
+++ gcc/toplev.c 2005-07-20 14:03:08.000000000 +0200
@@ -806,6 +806,7 @@ check_global_declarations (tree *vec, in
static storage, but not defined. */
if (TREE_CODE (decl) == VAR_DECL
&& TREE_STATIC (decl)
+ && (cgraph_global_info_ready || !flag_unit_at_a_time)
&& !TREE_ASM_WRITTEN (decl))
DECL_IGNORED_P (decl) = 1;
--- gcc/testsuite/gcc.dg/debug/dwarf2/static-var1.c.jj 2005-07-20 13:59:26.000000000 +0200
+++ gcc/testsuite/gcc.dg/debug/dwarf2/static-var1.c 2005-07-20 14:00:23.000000000 +0200
@@ -0,0 +1,14 @@
+/* Check that debug info is emitted for static_var. */
+/* { dg-do compile */
+/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-final { scan-assembler "DW_TAG_variable" } } */
+
+static int static_var;
+
+int
+main (void)
+{
+ static_var += 3;
+ static_var *= 5;
+ return 0;
+}
gcc4-pr22052.patch:
c-decl.c | 55 ++++++++++++++++-----------------------------
testsuite/gcc.dg/inline1.c | 8 ++++++
testsuite/gcc.dg/inline2.c | 5 ++++
testsuite/gcc.dg/inline3.c | 7 +++++
testsuite/gcc.dg/inline4.c | 6 ++++
testsuite/gcc.dg/inline5.c | 6 ++++
6 files changed, 52 insertions(+), 35 deletions(-)
--- NEW FILE gcc4-pr22052.patch ---
2005-06-28 Eric Christopher <echristo redhat com>
PR c/22052
PR c/21975
* c-decl.c (diagnose_mismatched_decls): Define DECL_EXTERN_INLINE.
Use. Fix detection of invalid extern inline redefinition.
* gcc.dg/inline1.c: New test.
* gcc.dg/inline2.c: Ditto.
* gcc.dg/inline3.c: Ditto.
* gcc.dg/inline4.c: Ditto.
* gcc.dg/inline5.c: Ditto.
--- gcc/c-decl.c 28 Jun 2005 19:51:24 -0000 1.668
+++ gcc/c-decl.c 29 Jun 2005 00:10:39 -0000 1.669
@@ -1154,6 +1154,9 @@ diagnose_mismatched_decls (tree newdecl,
bool warned = false;
bool retval = true;
+#define DECL_EXTERN_INLINE(DECL) (DECL_DECLARED_INLINE_P (DECL) \
+ && DECL_EXTERNAL (DECL))
+
/* If we have error_mark_node for either decl or type, just discard
the previous decl - we're in an error cascade already. */
if (olddecl == error_mark_node || newdecl == error_mark_node)
@@ -1282,6 +1285,7 @@ diagnose_mismatched_decls (tree newdecl,
Multiple definitions are not allowed (6.9p3,5) but GCC permits
two definitions if one is 'extern inline' and one is not. The non-
extern-inline definition supersedes the extern-inline definition. */
+
else if (TREE_CODE (newdecl) == FUNCTION_DECL)
{
/* If you declare a built-in function name as static, or
@@ -1304,45 +1308,25 @@ diagnose_mismatched_decls (tree newdecl,
{
if (DECL_INITIAL (olddecl))
{
- /* If both decls have extern inline and are in the same TU,
- reject the new decl. */
- if (DECL_DECLARED_INLINE_P (olddecl)
- && DECL_EXTERNAL (olddecl)
- && DECL_DECLARED_INLINE_P (newdecl)
- && DECL_EXTERNAL (newdecl)
+ /* If both decls are in the same TU and the new declaration
+ isn't overridding an extern inline reject the new decl.
+ When we handle c99 style inline rules we'll want to reject
+ the following:
+
+ DECL_EXTERN_INLINE (olddecl)
+ && !DECL_EXTERN_INLINE (newdecl)
+
+ if they're in the same translation unit. Until we implement
+ the full semantics we accept the construct. */
+ if (!(DECL_EXTERN_INLINE (olddecl)
+ && !DECL_EXTERN_INLINE (newdecl))
&& same_translation_unit_p (newdecl, olddecl))
{
error ("%Jredefinition of %qD", newdecl, newdecl);
locate_old_decl (olddecl, error);
return false;
}
- /* If both decls have not extern inline, reject the new decl. */
- if (!DECL_DECLARED_INLINE_P (olddecl)
- && !DECL_EXTERNAL (olddecl)
- && !DECL_DECLARED_INLINE_P (newdecl)
- && !DECL_EXTERNAL (newdecl))
- {
- error ("%Jredefinition of %qD", newdecl, newdecl);
- locate_old_decl (olddecl, error);
- return false;
- }
- /* If the new decl is declared as extern inline, error if they are
- in the same TU, otherwise retain the old decl. */
- if (!DECL_DECLARED_INLINE_P (olddecl)
- && !DECL_EXTERNAL (olddecl)
- && DECL_DECLARED_INLINE_P (newdecl)
- && DECL_EXTERNAL (newdecl))
- {
- if (same_translation_unit_p (newdecl, olddecl))
- {
- error ("%Jredefinition of %qD", newdecl, newdecl);
- locate_old_decl (olddecl, error);
- return false;
- }
- else
- retval = false;
- }
- }
+ }
}
/* If we have a prototype after an old-style function definition,
the argument types must be checked specially. */
@@ -1371,8 +1355,7 @@ diagnose_mismatched_decls (tree newdecl,
occur only in Objective C; see also above. (FIXME: Make
Objective C use normal builtins.) */
if (!DECL_IS_BUILTIN (olddecl)
- && !(DECL_EXTERNAL (olddecl)
- && DECL_DECLARED_INLINE_P (olddecl)))
+ && !DECL_EXTERN_INLINE (olddecl))
{
error ("%Jstatic declaration of %qD follows "
"non-static declaration", newdecl, newdecl);
@@ -1585,6 +1568,8 @@ diagnose_mismatched_decls (tree newdecl,
if (warned || pedwarned)
locate_old_decl (olddecl, pedwarned ? pedwarn : warning0);
+#undef DECL_EXTERN_INLINE
+
return retval;
}
--- gcc/testsuite/gcc.dg/inline1.c 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/inline1.c 29 Jun 2005 00:11:36 -0000 1.1
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -std=gnu89" } */
+/* This test is expected to fail with an error for the redefinition of foo.
+ This violates the constraint of 6.9#3 (no more than one external definition
+ of an identifier with internal linkage in the same translation unit). */
+static inline int foo(void) { return 1; } /* { dg-error "previous definition of" } */
+static inline int foo(void) { return 0; } /* { dg-error "redefinition of" } */
+
--- gcc/testsuite/gcc.dg/inline2.c 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/inline2.c 29 Jun 2005 00:11:36 -0000 1.1
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -std=gnu89" } */
+/* This test should compile successfully. */
+extern inline int foo (void) { return 0; }
+inline int foo (void) { return 1; }
--- gcc/testsuite/gcc.dg/inline3.c 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/inline3.c 29 Jun 2005 00:11:36 -0000 1.1
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -std=gnu89" } */
+/* This testcase should fail since we're redefining foo in the same
+ translation unit. */
+extern inline int foo(void) { return 0; }
+inline int foo (void) { return 1; } /* { dg-error "previous definition of" } */
+int foo (void) { return 2; } /* { dg-error "error: redefinition of" } */
--- gcc/testsuite/gcc.dg/inline4.c 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/inline4.c 29 Jun 2005 00:11:36 -0000 1.1
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -std=gnu89" } */
+/* This testcase should fail since we're redefining foo in the same
+ translation unit. */
+int foo (void) { return 2; } /* { dg-error "previous definition of" } */
+extern inline int foo (void) { return 1; } /* { dg-error "redefinition of" } */
--- gcc/testsuite/gcc.dg/inline5.c 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/gcc.dg/inline5.c 29 Jun 2005 00:11:36 -0000 1.1
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -std=gnu89" } */
+/* This testcase should fail since we're redefining foo in the same
+ translation unit. */
+extern inline int foo (void) { return 2; } /* { dg-error "previous definition of" } */
+extern inline int foo (void) { return 1; } /* { dg-error "redefinition of" } */
gcc4-pr22167.patch:
gcse.c | 2 +-
testsuite/g++.dg/opt/pr22167.C | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletion(-)
--- NEW FILE gcc4-pr22167.patch ---
2005-07-21 Richard Sandiford <richard codesourcery com>
PR rtl-optimization/22167
* gcse.c (hoist_code): Fix hoist_exprs[] check.
* g++.dg/opt/pr22167.C: New test.
--- gcc/gcse.c 24 Feb 2005 21:47:24 -0000 1.335
+++ gcc/gcse.c 21 Jul 2005 06:53:25 -0000 1.335.2.1
@@ -4886,7 +4886,7 @@ hoist_code (void)
insn_inserted_p = 0;
/* These tests should be the same as the tests above. */
- if (TEST_BIT (hoist_vbeout[bb->index], i))
+ if (TEST_BIT (hoist_exprs[bb->index], i))
{
/* We've found a potentially hoistable expression, now
we look at every block BB dominates to see if it
--- gcc/testsuite/g++.dg/opt/pr22167.C 1 Jan 1970 00:00:00 -0000
+++ gcc/testsuite/g++.dg/opt/pr22167.C 21 Jul 2005 06:53:29 -0000 1.1.2.1
@@ -0,0 +1,32 @@
+// Derived from PR22167, which failed on some RISC targets. The call to
+// foo() has two successors, one normal and one exceptional, and both
+// successors use &a[0] and x. Expressions involving &a[0] can be hoisted
+// before the call but those involving x cannot.
+// { dg-options "-Os" }
+// { dg-do run }
+
+int a[4];
+
+struct S {
+ S() : x (0) {}
+ ~S() { a[0] = x; }
+ int x;
+};
+
+void
+foo (int *x)
+{
+ if (*x == 1)
+ throw 1;
+ *x = 1;
+}
+
+int
+main()
+{
+ S s;
+ foo (&s.x);
+ if (a[0] == s.x)
+ a[0]++;
+ return a[0];
+}
gcc4-rh163058.patch:
calls.c | 32 +++++++++++++++
testsuite/gcc.c-torture/execute/20050713-1.c | 56 +++++++++++++++++++++++++++
2 files changed, 88 insertions(+)
--- NEW FILE gcc4-rh163058.patch ---
2005-07-13 Jakub Jelinek <jakub redhat com>
* calls.c (store_one_arg): Check for sibling call MEM arguments
from already clobbered incoming argument area.
* gcc.c-torture/execute/20050713-1.c: New test.
--- gcc/calls.c.jj 2005-07-02 02:27:09.000000000 +0200
+++ gcc/calls.c 2005-07-13 20:05:36.000000000 +0200
@@ -4062,6 +4062,38 @@ store_one_arg (struct arg_data *arg, rtx
stack_arg_under_construction--;
}
+ /* Check for overlap with already clobbered argument area. */
+ if ((flags & ECF_SIBCALL) && MEM_P (arg->value))
+ {
+ int i = -1;
+ unsigned int k;
+ rtx x = arg->value;
+
+ if (XEXP (x, 0) == current_function_internal_arg_pointer)
+ i = 0;
+ else if (GET_CODE (XEXP (x, 0)) == PLUS
+ && XEXP (XEXP (x, 0), 0) ==
+ current_function_internal_arg_pointer
+ && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)
+ i = INTVAL (XEXP (XEXP (x, 0), 1));
+ else
+ i = -1;
+
+ if (i >= 0)
+ {
+#ifdef ARGS_GROW_DOWNWARD
+ i = -i - arg->locate.size.constant;
+#endif
+ for (k = 0; k < arg->locate.size.constant; k++)
+ if (i + k < stored_args_map->n_bits
+ && TEST_BIT (stored_args_map, i + k))
+ {
+ sibcall_failure = 1;
+ break;
+ }
+ }
+ }
+
/* Don't allow anything left on stack from computation
of argument to alloca. */
if (flags & ECF_MAY_BE_ALLOCA)
--- gcc/testsuite/gcc.c-torture/execute/20050713-1.c.jj 2005-07-13 20:23:42.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/20050713-1.c 2005-07-13 20:23:27.000000000 +0200
@@ -0,0 +1,56 @@
+/* Test that sibling call is not used if there is an argument overlap. */
+
+extern void abort (void);
+
+struct S
+{
+ int a, b, c;
+};
+
+int
+foo2 (struct S x, struct S y)
+{
+ if (x.a != 3 || x.b != 4 || x.c != 5)
+ abort ();
+ if (y.a != 6 || y.b != 7 || y.c != 8)
+ abort ();
+ return 0;
+}
+
+int
+foo3 (struct S x, struct S y, struct S z)
+{
+ foo2 (x, y);
+ if (z.a != 9 || z.b != 10 || z.c != 11)
+ abort ();
+ return 0;
+}
+
+int
+bar2 (struct S x, struct S y)
+{
+ return foo2 (y, x);
+}
+
+int
+bar3 (struct S x, struct S y, struct S z)
+{
+ return foo3 (y, x, z);
+}
+
+int
+baz3 (struct S x, struct S y, struct S z)
+{
+ return foo3 (y, z, x);
+}
+
+int
+main (void)
+{
+ struct S a = { 3, 4, 5 }, b = { 6, 7, 8 }, c = { 9, 10, 11 };
+
+ bar2 (b, a);
+ bar3 (b, a, c);
+ baz3 (c, a, b);
+ return 0;
+}
gcc4-s390-stack-protector.patch:
linux.h | 6 ++++
s390.c | 26 ++++++++++++++++--
s390.h | 2 -
s390.md | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 121 insertions(+), 5 deletions(-)
--- NEW FILE gcc4-s390-stack-protector.patch ---
2005-07-08 Jakub Jelinek <jakub redhat com>
* config/s390/linux.h (TARGET_THREAD_SSP_OFFSET): Define.
* config/s390/s390.md (stack_protect_set, stack_protect_test): If
TARGET_THREAD_SSP_OFFSET is defined, change operands[1] to
(MEM:P (PLUS:P (tp, TARGET_THREAD_SSP_OFFSET))).
2005-07-04 Andreas Krebbel <krebbel1 de ibm com>
* config/s390/s390.c (print_operand): New output modifier 'G' added.
* config/s390/s390.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New constants.
("stack_protect_set", "stack_protect_test"): New expanders.
("stack_protect_setsi", "stack_protect_setdi", "stack_protect_testsi",
"stack_protect_testdi"): New insn definitions.
2005-06-07 Adrian Straetling <straetling de ibm com>
* config/s390/s390.c: (s390_compare_emitted): New global variable.
(s390_emit_compare): Do not emit comparison again after cas.
* config/s390/s390.h (s390_compare_emitted): Declare.
--- gcc/config/s390/linux.h.jj 2004-10-17 20:09:46.000000000 +0200
+++ gcc/config/s390/linux.h 2005-07-08 18:08:27.000000000 +0200
@@ -94,4 +94,10 @@ Software Foundation, 59 Temple Place - S
#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
+#ifdef TARGET_LIBC_PROVIDES_SSP
+/* s390 glibc provides __stack_chk_guard in 0x14(tp),
+ s390x glibc provides it at 0x28(tp). */
+#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
+#endif
+
#endif
--- gcc/config/s390/s390.h.jj 2005-07-08 17:32:28.000000000 +0200
+++ gcc/config/s390/s390.h 2005-07-08 21:56:26.000000000 +0200
@@ -880,7 +880,7 @@ do { \
/* Define the information needed to generate branch and scc insns. This is
stored from the compare operation. Note that we can't use "rtx" here
since it hasn't been defined! */
-extern struct rtx_def *s390_compare_op0, *s390_compare_op1;
+extern struct rtx_def *s390_compare_op0, *s390_compare_op1, *s390_compare_emitted;
/* Relative costs of operations. */
--- gcc/config/s390/s390.md.jj 2005-04-19 17:27:54.000000000 +0200
+++ gcc/config/s390/s390.md 2005-07-08 22:02:39.000000000 +0200
@@ -119,7 +119,11 @@
(UNSPEC_TLS_LOAD 512)
; String Functions
- (UNSPEC_SRST 600)
+ (UNSPEC_SRST 600)
+
+ ; Stack Smashing Protector
+ (UNSPEC_SP_SET 700)
+ (UNSPEC_SP_TEST 701)
])
;;
@@ -8157,3 +8161,89 @@
DONE;
})
+;
+; Stack Protector Patterns
+;
+
+(define_expand "stack_protect_set"
+ [(set (match_operand 0 "memory_operand" "")
+ (match_operand 1 "memory_operand" ""))]
+ ""
+{
+#ifdef TARGET_THREAD_SSP_OFFSET
+ rtx tp = gen_reg_rtx (Pmode);
+
+ emit_move_insn (tp, gen_rtx_REG (Pmode, 36));
+ mark_reg_pointer (tp, BITS_PER_WORD);
+
+ operands[1]
+ = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, tp,
+ GEN_INT (TARGET_THREAD_SSP_OFFSET)));
+#endif
+ if (TARGET_64BIT)
+ emit_insn (gen_stack_protect_setdi (operands[0], operands[1]));
+ else
+ emit_insn (gen_stack_protect_setsi (operands[0], operands[1]));
+
+ DONE;
+})
+
+(define_insn "stack_protect_setsi"
+ [(set (match_operand:SI 0 "memory_operand" "=Q")
+ (unspec:SI [(match_operand:SI 1 "memory_operand" "Q")] UNSPEC_SP_SET))]
+ ""
+ "mvc\t%O0(%G0,%R0),%S1"
+ [(set_attr "op_type" "SS")])
+
+(define_insn "stack_protect_setdi"
+ [(set (match_operand:DI 0 "memory_operand" "=Q")
+ (unspec:DI [(match_operand:DI 1 "memory_operand" "Q")] UNSPEC_SP_SET))]
+ "TARGET_64BIT"
+ "mvc\t%O0(%G0,%R0),%S1"
+ [(set_attr "op_type" "SS")])
+
+(define_expand "stack_protect_test"
+ [(match_operand 0 "memory_operand" "")
+ (match_operand 1 "memory_operand" "")
+ (match_operand 2 "" "")]
+ ""
+{
+#ifdef TARGET_THREAD_SSP_OFFSET
+ rtx tp = gen_reg_rtx (Pmode);
+
+ emit_move_insn (tp, gen_rtx_REG (Pmode, 36));
+ mark_reg_pointer (tp, BITS_PER_WORD);
+
+ operands[1]
+ = gen_rtx_MEM (Pmode, gen_rtx_PLUS (Pmode, tp,
+ GEN_INT (TARGET_THREAD_SSP_OFFSET)));
+#endif
+ s390_compare_op0 = operands[0];
+ s390_compare_op1 = operands[1];
+ s390_compare_emitted = gen_rtx_REG (CCZmode, 33);
+
+ if (TARGET_64BIT)
+ emit_insn (gen_stack_protect_testdi (operands[0], operands[1]));
+ else
+ emit_insn (gen_stack_protect_testsi (operands[0], operands[1]));
+
+ emit_jump_insn (gen_beq (operands[2]));
+ DONE;
+})
+
+(define_insn "stack_protect_testsi"
+ [(set (reg:CCZ 33)
+ (unspec:CCZ [(match_operand:SI 0 "memory_operand" "Q")
+ (match_operand:SI 1 "memory_operand" "Q")] UNSPEC_SP_TEST))]
+ ""
+ "clc\t%O0(%G0,%R0),%S1"
+ [(set_attr "op_type" "SS")])
+
+(define_insn "stack_protect_testdi"
+ [(set (reg:CCZ 33)
+ (unspec:CCZ [(match_operand:DI 0 "memory_operand" "Q")
+ (match_operand:DI 1 "memory_operand" "Q")] UNSPEC_SP_TEST))]
+ "TARGET_64BIT"
+ "clc\t%O0(%G0,%R0),%S1"
+ [(set_attr "op_type" "SS")])
+
--- gcc/config/s390/s390.c.jj 2005-07-08 17:32:28.000000000 +0200
+++ gcc/config/s390/s390.c 2005-07-08 21:56:26.000000000 +0200
@@ -278,6 +278,10 @@ static int s390_sr_alias_set = 0;
emitted. */
rtx s390_compare_op0, s390_compare_op1;
+/* Save the result of a compare_and_swap until the branch or scc is
+ emitted. */
+rtx s390_compare_emitted = NULL_RTX;
+
/* Structure used to hold the components of a S/390 memory
address. A legitimate address on S/390 is of the general
form
@@ -769,10 +773,21 @@ rtx
s390_emit_compare (enum rtx_code code, rtx op0, rtx op1)
{
enum machine_mode mode = s390_select_ccmode (code, op0, op1);
- rtx cc = gen_rtx_REG (mode, CC_REGNUM);
+ rtx ret = NULL_RTX;
- emit_insn (gen_rtx_SET (VOIDmode, cc, gen_rtx_COMPARE (mode, op0, op1)));
- return gen_rtx_fmt_ee (code, VOIDmode, cc, const0_rtx);
+ /* Do not output a redundant compare instruction if a compare_and_swap
+ pattern already computed the result and the machine modes match. */
+ if (s390_compare_emitted && GET_MODE (s390_compare_emitted) == mode)
+ ret = gen_rtx_fmt_ee (code, VOIDmode, s390_compare_emitted, const0_rtx);
+ else
+ {
+ rtx cc = gen_rtx_REG (mode, CC_REGNUM);
+
+ emit_insn (gen_rtx_SET (VOIDmode, cc, gen_rtx_COMPARE (mode, op0, op1)));
+ ret = gen_rtx_fmt_ee (code, VOIDmode, cc, const0_rtx);
+ }
+ s390_compare_emitted = NULL_RTX;
+ return ret;
}
/* Emit a jump instruction to TARGET. If COND is NULL_RTX, emit an
@@ -4334,6 +4349,7 @@ print_operand_address (FILE *file, rtx a
'C': print opcode suffix for branch condition.
'D': print opcode suffix for inverse branch condition.
'J': print tls_load/tls_gdcall/tls_ldcall suffix
+ 'G': print the size of the operand in bytes.
'O': print only the displacement of a memory reference.
'R': print only the base register of a memory reference.
'S': print S-type memory reference (base+displacement).
@@ -4380,6 +4396,10 @@ print_operand (FILE *file, rtx x, int co
abort ();
return;
+ case 'G':
+ fprintf (file, "%u", GET_MODE_SIZE (GET_MODE (x)));
+ return;
+
case 'O':
{
struct s390_address ad;
gcc4-stack-protector.patch:
Makefile.in | 10 +-
c-cppbuiltin.c | 6 +
cfgexpand.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++-
common.opt | 12 ++
config.in | 6 +
config/i386/i386.c | 25 +++++
config/i386/i386.h | 1
config/i386/i386.md | 184 ++++++++++++++++++++++++++++++----------
config/i386/linux.h | 5 +
config/i386/linux64.h | 6 +
config/rs6000/darwin.h | 14 +--
config/rs6000/linux.h | 5 +
config/rs6000/linux64.h | 6 +
config/rs6000/rs6000.c | 162 +++++++++++++++++++++++++++++++-----
config/rs6000/rs6000.h | 93 ++++++++++----------
config/rs6000/rs6000.md | 82 ++++++++++++++++++
config/rs6000/sysv4.h | 5 -
config/s390/s390.c | 24 +++--
config/s390/s390.h | 10 +-
config/sparc/linux.h | 5 +
config/sparc/linux64.h | 6 +
config/sparc/sparc.c | 10 ++
config/sparc/sparc.h | 1
config/sparc/sparc.md | 93 ++++++++++++++++++++
configure | 48 ++++++++++
configure.ac | 39 ++++++++
doc/md.texi | 34 ++++++-
doc/tm.texi | 26 +++++
function.c | 104 +++++++++++++++++++++++
function.h | 4
gcc.c | 12 ++
params.def | 5 +
regrename.c | 6 +
target-def.h | 5 +
target.h | 11 ++
targhooks.c | 91 ++++++++++++++++++++
targhooks.h | 4
toplev.c | 10 ++
tree.h | 1
39 files changed, 1231 insertions(+), 156 deletions(-)
--- NEW FILE gcc4-stack-protector.patch ---
2005-07-11 Jakub Jelinek <jakub redhat com>
* cfgexpand.c (stack_protect_classify_type): Use TYPE_SIZE_UNIT (type)
instead of TYPE_MAX_VALUE (TYPE_DOMAIN (type)) to get array size in
bytes.
2005-07-07 Jakub Jelinek <jakub redhat com>
* config/sparc/sparc.md (stack_protect_testsi): Put clobbers after
all sets in the pattern.
* config/rs6000/rs6000.md (stack_protect_testsi,
stack_protect_testdi): Likewise.
2005-07-06 Kaz Kojima <kkojima gcc gnu org>
* function.c (expand_function_end): Revert part of 2005-06-27
patch. Do sjlj_emit_function_exit_after after return_label.
2005-07-06 Jakub Jelinek <jakub redhat com>
* config/rs6000/rs6000.h (RS6000_VARARGS_AREA, RS6000_VARARGS_SIZE):
Remove.
(STARTING_FRAME_OFFSET): Don't add RS6000_VARARGS_AREA.
(machine_function): Move typedef to...
* config/rs6000/rs6000.c (machine_function): ... here. Add
varargs_save_offset field.
(rs6000_stack_t): Remove varargs_size field.
(setup_incoming_varargs): Allocate varargs save area using
assign_stack_local, try to make it as small as possible.
Save offset from virtual_stack_vars_rtx to the save area
in cfun->machine->varargs_save_offset. Use UNITS_PER_FP_WORD
instead of magic 8 when fp word byte size is used.
(rs6000_va_start): Use cfun->machine->varargs_save_offset
instead of -RS6000_VARARGS_SIZE.
(rs6000_stack_info, debug_stack_info,
rs6000_initial_elimination_offset): Remove all traces of
varargs_size.
* config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Remove.
* config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Don't add
RS6000_VARARGS_AREA.
2005-07-06 Jakub Jelinek <jakub redhat com>
* config/sparc/sparc.h (sparc_compare_emitted): New extern.
* config/sparc/sparc.c (sparc_compare_emitted): New variable.
(gen_compare_reg): If sparc_compare_emitted is set, clear it
and return its previous value.
(emit_v9_brxx_insn): Assert sparc_compare_emitted is NULL.
* config/sparc/sparc.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New
constants.
(stack_protect_set, stack_protect_test): New expanders.
(stack_protect_setsi, stack_protect_setdi, stack_protect_testsi,
stack_protect_testdi): New insns.
* config/sparc/linux.h (TARGET_THREAD_SSP_OFFSET): Define.
* config/sparc/linux64.h (TARGET_THREAD_SSP_OFFSET): Define.
2005-07-02 Jakub Jelinek <jakub redhat com>
* gcc.c (LINK_SSP_SPEC): Define.
(link_ssp_spec): New variable.
(LINK_COMMAND_SPEC): Add %(link_ssp).
(static_specs): Add link_ssp_spec.
* configure.ac (TARGET_LIBC_PROVIDES_SSP): New test.
* configure: Rebuilt.
* config.in: Rebuilt.
* config/rs6000/linux.h (TARGET_THREAD_SSP_OFFSET): Define.
* config/rs6000/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise.
* config/i386/linux.h (TARGET_THREAD_SSP_OFFSET): Likewise.
* config/i386/linux64.h (TARGET_THREAD_SSP_OFFSET): Likewise.
* config/rs6000/rs6000.md (stack_protect_set, stack_protect_test):
If TARGET_THREAD_SSP_OFFSET is defined, use -0x7010(13) resp.
-0x7008(2) instead of reading __stack_chk_guard variable.
* config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): Change
number.
(UNSPEC_SP_TLS_SET, UNSPEC_SP_TLS_TEST): New constants.
(stack_protect_set, stack_protect_test): Use *_tls* patterns
if TARGET_THREAD_SSP_OFFSET is defined.
(stack_tls_protect_set_si, stack_tls_protect_set_di,
stack_tls_protect_test_si, stack_tls_protect_test_di): New insns.
Revert:
2005-06-27 Richard Henderson <rth redhat com>
* libgcc-std.ver (GCC_4.1.0): New.
* libgcc.h (__stack_chk_guard): Declare.
(__stack_chk_fail, __stack_chk_fail_local): Declare.
* libgcc2.c (L_stack_chk, L_stack_chk_local): New.
* mklibgcc.in (lib2funcs): Add them.
2005-07-01 Jakub Jelinek <jakub redhat com>
PR target/22262
* config/i386/i386.md (stack_protect_test_si,
stack_protect_test_di): Add earlyclobber for scratch 3.
* config/rs6000/rs6000.md (stack_protect_testsi,
stack_protect_testdi): Add earlyclobber for scratch 3,
remove earlyclobber from scratch 4.
2005-06-30 Andrew Pinski <pinskia physics uc edu>
* config/rs6000/darwin.h (STARTING_FRAME_OFFSET):
Set to 0 for FRAME_GROWS_DOWNWARD.
(REGISTER_NAMES): Add sfp.
2005-06-30 Andrew Pinski <pinskia physics uc edu>
* config/rs6000/darwin.h (FRAME_POINTER_REGNUM): Rename to ...
(HARD_FRAME_POINTER_REGNUM): this.
2005-06-30 Jakub Jelinek <jakub redhat com>
* function.c (gen_stack_protect_test): Add third argument.
2005-06-30 Jakub Jelinek <jakub redhat com>
* function.c (stack_protect_epilogue): Pass label to
stack_protect_test, assume it emitted also the conditional
branch.
* doc/md.texi (stack_protect_test): Adjust documentation.
* config/i386/i386.md (stack_protect_test): Add third argument,
emit beq with operands[2].
* config/rs6000/rs6000.h (FRAME_GROWS_DOWNWARD): Define to
flag_stack_protect != 0.
* config/rs6000/rs6000.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New
constants.
(stack_protect_set, stack_protect_test): New expanders.
(stack_protect_setsi, stack_protect_setdi, stack_protect_testsi,
stack_protect_testdi): New insns.
* config/rs6000/rs6000.c (rs6000_stack_protect_fail): New function.
(TARGET_STACK_PROTECT_FAIL): Define.
(rs6000_generate_compare): Handle UNSPEC_SP_TEST.
* config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Increment.
(DWARF_FRAME_REGISTERS, DWARF_REG_TO_UNWIND_COLUMN): Adjust, so
that addition of sfp doesn't change these.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS,
REG_ALLOC_ORDER): Add sfp.
(INT_REGNO_P): Include FRAME_POINTER_REGNUM.
(FRAME_POINTER_REGNUM): Define to 113.
(HARD_FRAME_POINTER_REGNUM): Define to 31.
(REG_CLASS_CONTENTS, REGNO_REG_CLASS): Add sfp.
(STARTING_FRAME_OFFSET): Set to 0 for FRAME_GROWS_DOWNWARD.
(ELIMINABLE_REGS): Never eliminate to
FRAME_POINTER_REGNUM, but HARD_FRAME_POINTER_REGNUM
instead. Add eliminations from FRAME_POINTER_REGNUM.
(REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P, INT_REG_OK_FOR_INDEX_P):
Include FRAME_POINTER_REGNUM.
(REGISTER_NAMES): Add sfp.
* config/rs6000/rs6000.c (rs6000_reg_names): Add sfp.
(alt_reg_names): Likewise.
(rs6000_stack_info): Handle FRAME_GROWS_DOWNWARD.
(rs6000_emit_prologue): Use HARD_FRAME_POINTER_REGNUM
instead of FRAME_POINTER_REGNUM.
(rs6000_initial_elimination_offset): Never eliminate to
FRAME_POINTER_REGNUM, but HARD_FRAME_POINTER_REGNUM
instead. Add elimination offsets from FRAME_POINTER_REGNUM.
* config/rs6000/sysv4.h (RS6000_VARARGS_AREA): Only return non-zero
if DEFAULT_ABI == ABI_V4.
2005-06-29 Andreas Krebbel <krebbel1 de ibm com>
* config/s390/s390.c (s390_decompose_address): Accept invalid
displacements for addresses containing frame_pointer_rtx or
virtual_stack_vars_rtx.
(s390_frame_info): Replaced use of STARTING_FRAME_OFFSET.
(s390_initial_elimination_offset): New offset when eliminating the
soft frame pointer.
* config/s390/s390.h (FRAME_GROWS_DOWNWARD): Defined as 1.
(STARTING_FRAME_OFFSET, STACK_DYNAMIC_OFFSET): Definitions changed.
2005-06-27 Jakub Jelinek <jakub redhat com>
* regrename.c (copy_value): Fix comment.
* toplev.c (process_options): Use if (FRAME_GROWS_DOWNWARD)
instead of preprocessor conditionals.
* targhooks.c (default_hidden_stack_protect_fail): Fall back to
default_external_stack_protect_fail if visibility is not supported
or not flag_pic.
* config/i386/i386.c (ix86_stack_protect_fail): New function.
(TARGET_STACK_PROTECT_FAIL): Define.
* config/i386/i386.md (stack_protect_si): Change CLOBBER into
SET to zero.
(stack_protect_di): Likewise. Use %k2 instead of %2 to avoid
invalid instruction xorl %rax, %rax.
2005-06-27 Richard Henderson <rth redhat com>
* c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__.
* cfgexpand.c: Include params.h.
(has_protected_decls, has_short_buffer): New.
(expand_stack_vars): Take a predicate to determine what to expand.
(defer_stack_allocation): True when flag_stack_protect on.
(SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New.
(SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New.
(stack_protect_classify_type, stack_protect_decl_phase): New.
(stack_protect_decl_phase_1, stack_protect_decl_phase_2): New.
[...2137 lines suppressed...]
@@ -1225,6 +1225,12 @@ copy_value (rtx dest, rtx src, struct va
if (frame_pointer_needed && dr == HARD_FRAME_POINTER_REGNUM)
return;
+ /* Do not propagate copies to fixed or global registers, patterns
+ can be relying to see particular fixed register or users can
+ expect the chosen global register in asm. */
+ if (fixed_regs[dr] || global_regs[dr])
+ return;
+
/* If SRC and DEST overlap, don't record anything. */
dn = hard_regno_nregs[dr][GET_MODE (dest)];
sn = hard_regno_nregs[sr][GET_MODE (dest)];
--- gcc/target-def.h 25 Jun 2005 02:01:09 -0000 1.126
+++ gcc/target-def.h 27 Jun 2005 07:41:03 -0000 1.127
@@ -379,6 +379,9 @@ Foundation, 59 Temple Place - Suite 330,
#define TARGET_STDARG_OPTIMIZE_HOOK 0
+#define TARGET_STACK_PROTECT_GUARD default_stack_protect_guard
+#define TARGET_STACK_PROTECT_FAIL default_external_stack_protect_fail
+
#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_false
#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_false
#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_false
@@ -530,6 +533,8 @@ Foundation, 59 Temple Place - Suite 330,
TARGET_DWARF_CALLING_CONVENTION, \
TARGET_DWARF_HANDLE_FRAME_UNSPEC, \
TARGET_STDARG_OPTIMIZE_HOOK, \
+ TARGET_STACK_PROTECT_GUARD, \
+ TARGET_STACK_PROTECT_FAIL, \
TARGET_CALLS, \
TARGET_CXX, \
TARGET_HAVE_NAMED_SECTIONS, \
--- gcc/target.h 25 Jun 2005 02:01:09 -0000 1.138
+++ gcc/target.h 27 Jun 2005 07:41:04 -0000 1.139
@@ -526,7 +526,16 @@ struct gcc_target
from VA_ARG_EXPR. LHS is left hand side of MODIFY_EXPR, RHS
is right hand side. Returns true if the statements doesn't need
to be checked for va_list references. */
- bool (*stdarg_optimize_hook) (struct stdarg_info *ai, tree lhs, tree rhs);
+ bool (* stdarg_optimize_hook) (struct stdarg_info *ai, tree lhs, tree rhs);
+
+ /* This target hook allows the operating system to override the DECL
+ that represents the external variable that contains the stack
+ protection guard variable. The type of this DECL is ptr_type_node. */
+ tree (* stack_protect_guard) (void);
+
+ /* This target hook allows the operating system to override the CALL_EXPR
+ that is invoked when a check vs the guard variable fails. */
+ tree (* stack_protect_fail) (void);
/* Returns NULL if target supports the insn within a doloop block,
otherwise it returns an error message. */
--- gcc/targhooks.c 25 Jun 2005 02:01:10 -0000 2.42
+++ gcc/targhooks.c 27 Jun 2005 08:03:19 -0000 2.44
@@ -61,6 +61,7 @@ Software Foundation, 51 Franklin Street,
#include "target.h"
#include "tm_p.h"
#include "target-def.h"
+#include "ggc.h"
void
@@ -321,3 +322,93 @@ hook_invalid_arg_for_unprototyped_fn (
{
return NULL;
}
+
+/* Initialize the stack protection decls. */
+
+/* Stack protection related decls living in libgcc. */
+static GTY(()) tree stack_chk_guard_decl;
+
+tree
+default_stack_protect_guard (void)
+{
+ tree t = stack_chk_guard_decl;
+
+ if (t == NULL)
+ {
+ t = build_decl (VAR_DECL, get_identifier ("__stack_chk_guard"),
+ ptr_type_node);
+ TREE_STATIC (t) = 1;
+ TREE_PUBLIC (t) = 1;
+ DECL_EXTERNAL (t) = 1;
+ TREE_USED (t) = 1;
+ TREE_THIS_VOLATILE (t) = 1;
+ DECL_ARTIFICIAL (t) = 1;
+ DECL_IGNORED_P (t) = 1;
+
+ stack_chk_guard_decl = t;
+ }
+
+ return t;
+}
+
+static GTY(()) tree stack_chk_fail_decl;
+
+tree
+default_external_stack_protect_fail (void)
+{
+ tree t = stack_chk_fail_decl;
+
+ if (t == NULL_TREE)
+ {
+ t = build_function_type_list (void_type_node, NULL_TREE);
+ t = build_decl (FUNCTION_DECL, get_identifier ("__stack_chk_fail"), t);
+ TREE_STATIC (t) = 1;
+ TREE_PUBLIC (t) = 1;
+ DECL_EXTERNAL (t) = 1;
+ TREE_USED (t) = 1;
+ TREE_THIS_VOLATILE (t) = 1;
+ TREE_NOTHROW (t) = 1;
+ DECL_ARTIFICIAL (t) = 1;
+ DECL_IGNORED_P (t) = 1;
+
+ stack_chk_fail_decl = t;
+ }
+
+ return build_function_call_expr (t, NULL_TREE);
+}
+
+tree
+default_hidden_stack_protect_fail (void)
+{
+#ifndef HAVE_GAS_HIDDEN
+ return default_external_stack_protect_fail ();
+#else
+ tree t = stack_chk_fail_decl;
+
+ if (!flag_pic)
+ return default_external_stack_protect_fail ();
+
+ if (t == NULL_TREE)
+ {
+ t = build_function_type_list (void_type_node, NULL_TREE);
+ t = build_decl (FUNCTION_DECL,
+ get_identifier ("__stack_chk_fail_local"), t);
+ TREE_STATIC (t) = 1;
+ TREE_PUBLIC (t) = 1;
+ DECL_EXTERNAL (t) = 1;
+ TREE_USED (t) = 1;
+ TREE_THIS_VOLATILE (t) = 1;
+ TREE_NOTHROW (t) = 1;
+ DECL_ARTIFICIAL (t) = 1;
+ DECL_IGNORED_P (t) = 1;
+ DECL_VISIBILITY_SPECIFIED (t) = 1;
+ DECL_VISIBILITY (t) = VISIBILITY_HIDDEN;
+
+ stack_chk_fail_decl = t;
+ }
+
+ return build_function_call_expr (t, NULL_TREE);
+#endif
+}
+
+#include "gt-targhooks.h"
--- gcc/targhooks.h 25 Jun 2005 02:01:10 -0000 2.30
+++ gcc/targhooks.h 27 Jun 2005 07:40:48 -0000 2.31
@@ -34,6 +34,10 @@ extern enum machine_mode default_eh_retu
extern unsigned HOST_WIDE_INT default_shift_truncation_mask
(enum machine_mode);
+extern tree default_stack_protect_guard (void);
+extern tree default_external_stack_protect_fail (void);
+extern tree default_hidden_stack_protect_fail (void);
+
extern tree default_cxx_guard_type (void);
extern tree default_cxx_get_cookie_size (tree);
--- gcc/toplev.c 25 Jun 2005 02:01:10 -0000 1.961
+++ gcc/toplev.c 27 Jun 2005 08:05:27 -0000 1.963
@@ -1747,6 +1747,16 @@ process_options (void)
/* With -fcx-limited-range, we do cheap and quick complex arithmetic. */
if (flag_cx_limited_range)
flag_complex_method = 0;
+
+ /* Targets must be able to place spill slots at lower addresses. If the
+ target already uses a soft frame pointer, the transition is trivial. */
+ if (!FRAME_GROWS_DOWNWARD && flag_stack_protect)
+ {
+ warning ("-fstack-protector not supported for this target");
+ flag_stack_protect = 0;
+ }
+ if (!flag_stack_protect)
+ warn_stack_protect = 0;
}
/* Initialize the compiler back end. */
--- gcc/tree.h 25 Jun 2005 02:01:56 -0000 1.739
+++ gcc/tree.h 27 Jun 2005 07:40:45 -0000 1.740
@@ -3659,6 +3659,7 @@ extern int simple_cst_list_equal (tree,
extern void dump_tree_statistics (void);
extern void expand_function_end (void);
extern void expand_function_start (tree);
+extern void stack_protect_prologue (void);
extern void recompute_tree_invarant_for_addr_expr (tree);
extern bool is_global_var (tree t);
extern bool needs_to_live_in_memory (tree);
gcc4-vsb-stack.patch:
c-pragma.c | 22 ++++++++++++----------
doc/invoke.texi | 4 ++--
2 files changed, 14 insertions(+), 12 deletions(-)
--- NEW FILE gcc4-vsb-stack.patch ---
2005-05-18 H.J. Lu <hongjiu lu intel com>
PR middle-end/20303
* c-pragma.c: Include "vec.h".
(handle_pragma_visibility): Use VEC.
* doc/invoke.texi: Remove the nested visibility push limit.
--- gcc/c-pragma.c.jj 2004-11-29 15:47:36.000000000 -0800
+++ gcc/c-pragma.c 2005-05-18 09:14:46.000000000 -0700
@@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - S
#include "c-common.h"
#include "output.h"
#include "tm_p.h"
+#include "vec.h"
#include "target.h"
#define GCC_BAD(msgid) do { warning (msgid); return; } while (0)
@@ -583,15 +584,19 @@ maybe_apply_renaming_pragma (tree decl,
#ifdef HANDLE_PRAGMA_VISIBILITY
static void handle_pragma_visibility (cpp_reader *);
+typedef enum symbol_visibility visibility;
+DEF_VEC_MALLOC_P (visibility);
+
/* Sets the default visibility for symbols to something other than that
specified on the command line. */
static void
handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
-{ /* Form is #pragma GCC visibility push(hidden)|pop */
- static int visstack [16], visidx;
+{
+ /* Form is #pragma GCC visibility push(hidden)|pop */
tree x;
enum cpp_ttype token;
enum { bad, push, pop } action = bad;
+ static VEC (visibility) *visstack;
token = c_lex (&x);
if (token == CPP_NAME)
@@ -608,14 +613,15 @@ handle_pragma_visibility (cpp_reader *du
{
if (pop == action)
{
- if (!visidx)
+ if (!VEC_length (visibility, visstack))
{
GCC_BAD ("No matching push for %<#pragma GCC visibility pop%>");
}
else
{
- default_visibility = visstack[--visidx];
- visibility_options.inpragma = (visidx>0);
+ default_visibility = VEC_pop (visibility, visstack);
+ visibility_options.inpragma
+ = VEC_length (visibility, visstack) != 0;
}
}
else
@@ -627,14 +633,10 @@ handle_pragma_visibility (cpp_reader *du
{
GCC_BAD ("malformed #pragma GCC visibility push");
}
- else if (visidx >= 16)
- {
- GCC_BAD ("No more than sixteen #pragma GCC visibility pushes allowed at once");
- }
else
{
const char *str = IDENTIFIER_POINTER (x);
- visstack[visidx++] = default_visibility;
+ VEC_safe_push (visibility, visstack, default_visibility);
if (!strcmp (str, "default"))
default_visibility = VISIBILITY_DEFAULT;
else if (!strcmp (str, "internal"))
--- gcc/doc/invoke.texi.jj 2005-05-18 09:09:40.000000000 -0700
+++ gcc/doc/invoke.texi 2005-05-18 09:09:40.000000000 -0700
@@ -12445,8 +12445,8 @@ For those adding visibility support to e
@samp{#pragma GCC visibility} of use. This works by you enclosing
the declarations you wish to set visibility for with (for example)
@samp{#pragma GCC visibility push(hidden)} and
- samp{#pragma GCC visibility pop}. These can be nested up to sixteen
-times. Bear in mind that symbol visibility should be viewed @strong{as
+ samp{#pragma GCC visibility pop}.
+Bear in mind that symbol visibility should be viewed @strong{as
part of the API interface contract} and thus all new code should
always specify visibility when it is not the default ie; declarations
only for use within the local DSO should @strong{always} be marked explicitly
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/FC-4/.cvsignore,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- .cvsignore 9 Jun 2005 17:09:52 -0000 1.94
+++ .cvsignore 21 Jul 2005 07:22:27 -0000 1.95
@@ -1 +1 @@
-gcc-4.0.0-20050520.tar.bz2
+gcc-4.0.1-20050720.tar.bz2
Index: gcc4.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/FC-4/gcc4.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- gcc4.spec 9 Jun 2005 17:09:52 -0000 1.45
+++ gcc4.spec 21 Jul 2005 07:22:27 -0000 1.46
@@ -1,9 +1,9 @@
-%define DATE 20050520
-%define gcc_version 4.0.0
-%define gcc_release 8
+%define DATE 20050720
+%define gcc_version 4.0.1
+%define gcc_release 4
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
-%ifarch %{ix86} alpha ia64 x86_64 s390
+%ifarch %{ix86} alpha ia64 x86_64 s390 sparc sparc64
%define build_ada 1
%else
%define build_ada 0
@@ -24,7 +24,7 @@
Summary: Various compilers (C, C++, Objective-C, Java, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}
+Release: 3.fc4
License: GPL
Group: Development/Languages
Source0: gcc-%{version}-%{DATE}.tar.bz2
@@ -75,19 +75,29 @@
Patch3: gcc4-ia64-libunwind.patch
Patch4: gcc4-gnuc-rh-release.patch
Patch5: gcc4-java-nomulti.patch
-Patch6: gcc4-c++-pr19317.patch
-Patch7: gcc4-pr20249.patch
-Patch8: gcc4-g++-struct-layout.patch
-Patch9: gcc4-pr16104-test.patch
-Patch10: gcc4-pr20490.patch
-Patch11: gcc4-libstdc++-mt-alloc.patch
-Patch12: gcc4-struct-layout.patch
-Patch13: gcc4-ppc32-hwint32.patch
-Patch14: gcc4-gfortran-namelist.patch
-Patch15: gcc4-pr21492.patch
-Patch16: gcc4-pr19005-test.patch
-Patch17: gcc4-po-fixes.patch
-Patch18: gcc4-ada-target-bit.patch
+Patch6: gcc4-g++-struct-layout.patch
+Patch7: gcc4-pr16104-test.patch
+Patch8: gcc4-libstdc++-mt-alloc.patch
+Patch9: gcc4-struct-layout.patch
+Patch10: gcc4-ppc32-hwint32.patch
+Patch11: gcc4-pr17965.patch
+Patch12: gcc4-vsb-stack.patch
+Patch13: gcc4-libltdl-multilib.patch
+Patch14: gcc4-java-rh163099.patch
+Patch15: gcc4-libstdc++-pr22309.patch
+Patch16: gcc4-libjava-ia64-backtrace.patch
+Patch17: gcc4-stack-protector.patch
+Patch18: gcc4-ia64-stack-protector.patch
+Patch19: gcc4-s390-stack-protector.patch
+Patch20: gcc4-pr22052.patch
+Patch21: gcc4-fortran-bzbn.patch
+Patch22: gcc4-fortran-inf.patch
+Patch23: gcc4-fortran-data-range.patch
+Patch24: gcc4-pr20606.patch
+Patch25: gcc4-pr21828.patch
+Patch26: gcc4-rh163058.patch
+Patch27: gcc4-io_invalid-test.patch
+Patch28: gcc4-pr22167.patch
%define _gnu %{nil}
%ifarch sparc
@@ -402,21 +412,31 @@
%patch3 -p0 -b .ia64-libunwind~
%patch4 -p0 -b .gnuc-rh-release~
%patch5 -p0 -b .java-nomulti~
-%patch6 -p0 -b .c++-pr19317~
-%patch7 -p0 -b .pr20249~
-%patch8 -p0 -b .g++-struct-layout~
-%patch9 -p0 -b .pr16104-test~
-%patch10 -p0 -b .pr20490~
-%patch11 -p0 -b .libstdc++-mt-alloc~
-%patch12 -p0 -b .struct-layout~
-#%patch13 -p0 -b .ppc32-hwint32~
-%patch14 -p0 -b .gfortran-namelist~
-%patch15 -p0 -b .pr21492~
-%patch16 -p0 -b .pr19005-test~
-%patch17 -p0 -b .po-fixes~
-%patch18 -p0 -b .ada-target-bit~
+%patch6 -p0 -b .g++-struct-layout~
+%patch7 -p0 -b .pr16104-test~
+%patch8 -p0 -b .libstdc++-mt-alloc~
+%patch9 -p0 -b .struct-layout~
+#%patch10 -p0 -b .ppc32-hwint32~
+%patch11 -p0 -b .pr17965~
+%patch12 -p0 -b .vsb-stack~
+%patch13 -p0 -b .libltdl-multilib~
+%patch14 -p0 -b .java-rh163099~
+%patch15 -p0 -b .libstdc++-pr22309~
+%patch16 -p0 -b .libjava-ia64-backtrace~
+#%patch17 -p0 -b .stack-protector~
+#%patch18 -p0 -b .ia64-stack-protector~
+#%patch19 -p0 -b .s390-stack-protector~
+%patch20 -p0 -b .pr22052~
+%patch21 -p0 -b .fortran-bzbn~
+%patch22 -p0 -b .fortran-inf~
+%patch23 -p0 -b .fortran-data-range~
+%patch24 -p0 -b .pr20606~
+%patch25 -p0 -b .pr21828~
+%patch26 -p0 -b .rh163058~
+%patch27 -p0 -b .io_invalid-test~
+%patch28 -p0 -b .pr22167~
-perl -pi -e 's/4\.0\.0/4.0.0/' gcc/version.c
+perl -pi -e 's/4\.0\.2/4.0.1/' gcc/version.c
perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
perl -pi -e 's/\((prerelease|experimental|release|Red Hat[^)]*)\)/\(Red Hat %{version}-%{gcc_release}\)/' gcc/version.c
@@ -434,6 +454,23 @@
./contrib/gcc_update --touch
+%ifarch ppc
+if [ -d libstdc++-v3/config/abi/powerpc64-linux-gnu ]; then
+ mkdir -p libstdc++-v3/config/abi/powerpc64-linux-gnu/64
+ mv libstdc++-v3/config/abi/powerpc64-linux-gnu/{,64/}baseline_symbols.txt
+ mv libstdc++-v3/config/abi/powerpc64-linux-gnu/{32/,}baseline_symbols.txt
+ rm -rf libstdc++-v3/config/abi/powerpc64-linux-gnu/32
+fi
+%endif
+%ifarch sparc
+if [ -d libstdc++-v3/config/abi/sparc64-linux-gnu ]; then
+ mkdir -p libstdc++-v3/config/abi/sparc64-linux-gnu/64
+ mv libstdc++-v3/config/abi/sparc64-linux-gnu/{,64/}baseline_symbols.txt
+ mv libstdc++-v3/config/abi/sparc64-linux-gnu/{32/,}baseline_symbols.txt
+ rm -rf libstdc++-v3/config/abi/sparc64-linux-gnu/32
+fi
+%endif
+
%build
rm -fr obj-%{gcc_target_platform}
@@ -447,7 +484,6 @@
fi
CC=gcc
-OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'`
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
%ifarch sparc sparc64
@@ -506,16 +542,25 @@
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap-lean
%endif
+%if %{build_ada}
+for i in gcc/ada/rts/lib*-*.so.1; do
+ ln -sf `basename $i` gcc/ada/rts/`basename $i .1`
+done
+%endif
+
# run the tests.
make %{?_smp_mflags} -k check || :
-make -C %{gcc_target_platform}/libstdc++-v3/testsuite -k check-abi-verbose || :
+#cd gcc
+#mv testsuite{,.normal}
+#make %{?_smp_mflags} -k \
+# `sed -n 's/check-ada//;s/^CHECK_TARGETS[[:blank:]]*=[[:blank:]]*//p' Makefile` \
+# RUNTESTFLAGS=--target_board=unix/-fstack-protector || :
+#mv testsuite{,.ssp}
+#mv testsuite{.normal,}
+#cd ..
echo ====================TESTING=========================
( ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
-make -C %{gcc_target_platform}/libstdc++-v3/testsuite -k check-abi || :
echo ====================TESTING END=====================
-#cd %{gcc_target_platform}/libstdc++-v3
-#./mkcheck 0
-#cd ../..
# Make protoize
make -C gcc CC="./xgcc -B ./ -O2" proto
@@ -1414,6 +1459,140 @@
%endif
%changelog
+* Thu Jul 21 2005 Jakub Jelinek <jakub redhat com> 4.0.1-3.fc4
+- rebuilt for FC4
+ - disable stack protector patches
+- fix GCSE hoisting (Richard Sandiford, PR rtl-optimization/22167)
+
+* Wed Jul 20 2005 Jakub Jelinek <jakub redhat com> 4.0.1-4
+- update from CVS
+ - PRs c++/22132, c++/22139, c++/22263, c/22421, fortran/13257,
+ fortran/20842, fortran/21034, libfortran/18857, libfortran/21333,
+ libfortran/21480, libfortran/21593, libfortran/21594,
+ libfortran/21926, libfortran/22142, libfortran/22144,
+ libstdc++/21193, middle-end/22057, target/21721, testsuite/21969
+ - avoid discarding volatile casts (Richard Henderson, #162274,
+ PR tree-opt/22278)
+ - fix -frepo (Mark Mitchell, #163271, PR c++/22204)
+- ensure debug info for C static file-scope vars is emitted with
+ -g -O[23] (PR debug/21828)
+- fix fortran handling of repeated character literals in DATA (#163394,
+ PR fortran/20063)
+- avoid sibling calls if structure arguments passed by value overlap
+ (#163058)
+- work around PR middle-end/20606 (Andrew Haley)
+- fix fortran output of -Infinity for length 3 (Jerry DeLisle)
+- fix fortran handling of trailing blanks in exponents (Jerry DeLisle)
+
+* Thu Jul 14 2005 Jakub Jelinek <jakub redhat com> 4.0.1-3
+- update from CVS
+ - PRs bootstrap/21704, c++/10611, c++/20563, c++/20637, c++/20678,
+ c++/20746, c++/20789, c++/21903, c++/21929, fortran/15966,
+ fortran/16531, fortran/18781, fortran/22327, fortran/22417,
+ libfortran/16435, libfortran/21875, libgfortran/22412,
+ libstdc++/22102, middle-end/20593, tree-opt/22105
+- another attempt to fix libstdc++ mt allocator (#161061,
+ PR libstdc++/22309)
+- diagnose invalid uses of inline (Eric Christopher, #162216, #159731,
+ PRs c/22052, c/21975)
+- fix linker command line ordering when compiling multiple
+ java source files (Tom Tromey, #163099)
+- use backtrace () in libgcj even on ia64
+- support more than 16 nested GCC visibility pragmas (H.J.Lu)
+
+* Sun Jul 10 2005 Jakub Jelinek <jakub redhat com> 4.0.1-2
+- update from CVS
+ - PRs fortran/17792, fortran/19926, fortran/21257, fortran/21375
+- don't run check-ada twice
+- create libgna{t,rl}-4.0.so symlinks in the build dir, so that
+ check-ada doesn't link against installed libgnat
+- add ia64 -fstack-protector support
+- fix stack protector test for short arrays
+
+* Fri Jul 8 2005 Jakub Jelinek <jakub redhat com> 4.0.1-1
+- update from CVS
+ - GCC 4.0.1 release
+ - PRs tree-optimization/22000, tree-optimization/22171, middle-end/21985,
+ target/22260, c/21911, c/22308, target/22083, middle-end/17961
+ - use SCHED_OTHER rather than SCHED_RR in libjava (Andrew Haley, #152386)
+ - fix compound literal handling (Joseph S. Myers, #160018, c/22013, c/22098)
+- -fstack-protector{,-all} support (Richard Henderson)
+- fix -march=i386 -masm=intel -fpic (#162585)
+- make sure libstdc++ mt allocator calls pthread_key_delete before
+ libstdc++ dlclose (#161061, PR libstdc++/22309)
+- accept fortran ENTRY without () even in FUNCTIONs (#161634)
+- fix fortran handling of ENTRY return var names as rvalues (#161669)
+- fix fortran ICE on invalid preprocessor line (#161679)
+- fix fortran handling of long preprocessor lines (#161680)
+- add -std=legacy gfortran option (Roger Sayle)
+- support logical to boolean (and vice versa) conversions as legacy
+ fortran extension (Roger Sayle)
+- fortran Hollerith constant and character array fixes (Feng Wang, #161430)
+- add sparc and sparc64 to build_ada arches (#161865)
+
+* Thu Jun 23 2005 Jakub Jelinek <jakub redhat com> 4.0.0-13
+- update from CVS
+ - PRs bootstrap/17383, libfortran/16436, libfortran/19216,
+ libstdc++/21726, libstdc++/22111
+- fix libltdl fix for */lib64 paths (#156005)
+- fix ICE on invalid introduced in 4.0.0-10 (PR middle-end/22028)
+- further libstdc++.so symbol versioning fixes (PR libstdc++/22109)
+- fix ICE when compiling call with excessive size of arguments
+ passed by value (#160718, PR middle-end/17965)
+- grmic fix (Archit Shah, #133180)
+
+* Thu Jun 16 2005 Jakub Jelinek <jakub redhat com> 4.0.0-12
+- update from CVS
+ - PRs fortran/22038, libfortran/20930, libfortran/21950, rtl-opt/21528,
+ target/20301, target/21889, tree-opt/19768, tree-optimization/21171,
+ tree-optimization/21847, tree-optimization/22043
+- further fixes for Fortran FORALL, also use less temporary memory for masks
+- make libltdl aware of */lib64 paths (#156005)
+- cast of vector to integral type fix (PR middle-end/21850)
+- libstdc++.so symbol versioning fixes (Benjamin Kosnik)
+
+* Mon Jun 6 2005 Jakub Jelinek <jakub redhat com> 4.0.0-11
+- update from CVS
+ - PRs c++/20350, c++/21151, c++/21280, c++/21336, c++/21619, c++/21853,
+ c/21873, c/21879, fortran/16898, fortran/16939, fortran/17192,
+ fortran/17193, fortran/17202, fortran/18109, fortran/18283,
+ fortran/18689, fortran/18890, fortran/19107, fortran/19195,
+ fortran/20883, fortran/21912, java/21722, libgcj/21753, target/21888
+- fix some -fvar-tracking bugs that were causing bogus DW_OP_piece ops
+- extend GCC NLS support, so that gettext 0.14.5+ can verify GCC internal
+ diagnostics format strings
+- fix ICE on not fully enumerated VECTOR_CSTs (PR regression/21897)
+- fix a typo in reset_evolution_in_loop
+
+* Tue May 31 2005 Jakub Jelinek <jakub redhat com> 4.0.0-10
+- update from CVS
+ - PRs c++/21165, c++/21340, c++/21455, c++/21614, c++/21681, c++/21768,
+ c++/21784, fortran/20846, libfortran/17283, libfortran/20006,
+ libfortran/20179, libgcj/20273, libgcj/21775, middle-end/20931,
+ middle-end/20946, middle-end/21595
+- remove no longer used extra line in %%build (#158863)
+- fold extractions from vector constant
+- fix <emmintrin.h> and <xmmintrin.h>, so that they are usable
+ with -std=c89 -pedantic-errors
+- gimplify SAVE_EXPRs in types (PRs c/21536, c/20760)
+- fix ICE in ivopts on vector constant (Zdenek Dvorak,
+ PR tree-optimization/21817)
+
+* Wed May 25 2005 Jakub Jelinek <jakub redhat com> 4.0.0-9
+- update from CVS
+ - PRs c++/1016, c++/21686, libfortran/18495, libfortran/19014,
+ libfortran/19016, libfortran/19106, libfortran/20074,
+ libfortran/20436, libfortran/21075, libfortran/21108,
+ libfortran/21354, libfortran/21376, libgcj/21637, libgcj/21703,
+ libgcj/21736
+ - fix overflowed constant handling (Zdenek Dvorak, #156844,
+ PRs middle-end/21331, tree-opt/21293)
+- make sure slow_pthread_self is never yes for linux targets
+- fix reg-stack ICE (#158407, PR target/21716)
+- fix ICE on fortran alternate returns (#158434)
+- fix ICE on fortran functions without explicit type with implicit none
+ (#158232, PR fortran/21729)
+
* Fri May 20 2005 Jakub Jelinek <jakub redhat com> 4.0.0-8
- update from CVS
- PRs libfortran/21127, target/19933, target/21315, target/21390,
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/FC-4/sources,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- sources 9 Jun 2005 17:09:52 -0000 1.96
+++ sources 21 Jul 2005 07:22:27 -0000 1.97
@@ -1 +1 @@
-b0e49727c2f85abe67cbe447c4e131a8 gcc-4.0.0-20050520.tar.bz2
+005f492915dc6c6cf4d5e992d34036af gcc-4.0.1-20050720.tar.bz2
--- gcc4-ada-target-bit.patch DELETED ---
--- gcc4-c++-pr19317.patch DELETED ---
--- gcc4-gfortran-namelist.patch DELETED ---
--- gcc4-po-fixes.patch DELETED ---
--- gcc4-pr19005-test.patch DELETED ---
--- gcc4-pr20249.patch DELETED ---
--- gcc4-pr20490.patch DELETED ---
--- gcc4-pr21492.patch DELETED ---
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]