diff --git a/.cvsignore b/.cvsignore index 3ffde1f..72a8900 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,3 @@ fastjar-0.97.tar.gz -gcc-4.4.0-20090216.tar.bz2 +gcc-4.4.0-20090219.tar.bz2 cloog-ppl-0.15.tar.gz diff --git a/gcc.spec b/gcc.spec index 118c319..8a28515 100644 --- a/gcc.spec +++ b/gcc.spec @@ -3,7 +3,7 @@ %define gcc_version 4.4.0 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%define gcc_release 0.20 +%define gcc_release 0.21 %define _unpackaged_files_terminate_build 0 %define multilib_64_archs sparc64 ppc64 s390x x86_64 %define include_gappletviewer 1 diff --git a/gcc44-diff.patch b/gcc44-diff.patch deleted file mode 100644 index b3cc285..0000000 --- a/gcc44-diff.patch +++ /dev/null @@ -1,353 +0,0 @@ ---- gcc/DATESTAMP (revision 144236) -+++ gcc/DATESTAMP (revision 144237) -@@ -1 +1 @@ --20090216 -+20090217 ---- gcc/ChangeLog (revision 144236) -+++ gcc/ChangeLog (revision 144237) -@@ -1,3 +1,36 @@ -+2009-02-17 Richard Guenther -+ -+ PR tree-optimization/39202 -+ * tree-ssa-structalias.c (do_structure_copy): Before collapsing -+ a var make sure to follow existing collapses. -+ -+2009-02-17 Richard Guenther -+ -+ PR middle-end/39214 -+ * langhooks.c (lhd_print_error_function): Check for NULL block. -+ -+2009-02-17 Richard Guenther -+ -+ PR tree-optimization/39204 -+ * tree-ssa-pre.c (phi_translate_1): Lookup the value-number -+ of the PHI arg. -+ -+2009-02-17 Uros Bizjak -+ -+ * config/soft-fp/double.h: Update from glibc CVS. -+ -+2009-02-17 Richard Guenther -+ -+ PR tree-optimization/39207 -+ * tree-ssa-structalias.c (find_what_p_points_to): Do not emit -+ strict-aliasing warnings for pointers pointing to NULL. -+ -+2009-02-16 Joseph Myers -+ -+ PR c/35446 -+ * c-parser.c (c_parser_braced_init): Call pop_init_level when -+ skipping until next close brace. -+ - 2009-02-16 H.J. Lu - - PR target/37049 ---- gcc/testsuite/gcc.c-torture/compile/pr39202.c (revision 0) -+++ gcc/testsuite/gcc.c-torture/compile/pr39202.c (revision 144237) -@@ -0,0 +1,33 @@ -+typedef struct -+{ -+ union -+ { -+ int * aaa; -+ } u; -+} t_a; -+ -+typedef struct -+{ -+ unsigned bbb : 1; -+} t_b; -+ -+typedef struct -+{ -+ int ccc; -+ t_a ddd; -+ t_b eee; -+ int fff; -+} t_c; -+ -+typedef struct t_d -+{ -+ t_c f1; -+ t_c f2; -+} t_d; -+ -+void foo (void) -+{ -+ t_d ggg; -+ ggg.f1 = ggg.f2; -+} -+ ---- gcc/testsuite/gcc.dg/torture/pr39204.c (revision 0) -+++ gcc/testsuite/gcc.dg/torture/pr39204.c (revision 144237) -@@ -0,0 +1,131 @@ -+/* { dg-do compile } */ -+/* { dg-options "-w" } */ -+ -+typedef unsigned int size_t; -+typedef unsigned char __u_char; -+typedef unsigned short int __u_short; -+typedef unsigned int __u_int; -+typedef unsigned long int __u_long; -+typedef signed char __int8_t; -+typedef unsigned char __uint8_t; -+typedef signed short int __int16_t; -+typedef unsigned short int __uint16_t; -+typedef signed int __int32_t; -+typedef unsigned int __uint32_t; -+__extension__ typedef signed long long int __int64_t; -+__extension__ typedef unsigned long long int __uint64_t; -+__extension__ typedef long long int __quad_t; -+__extension__ typedef unsigned long long int __u_quad_t; -+__extension__ typedef __u_quad_t __dev_t; -+__extension__ typedef unsigned int __uid_t; -+__extension__ typedef unsigned int __gid_t; -+__extension__ typedef unsigned long int __ino_t; -+__extension__ typedef __u_quad_t __ino64_t; -+__extension__ typedef unsigned int __mode_t; -+__extension__ typedef unsigned int __nlink_t; -+__extension__ typedef long int __off_t; -+__extension__ typedef __quad_t __off64_t; -+__extension__ typedef int __pid_t; -+__extension__ typedef struct { -+ int __val[2]; -+} __fsid_t; -+__extension__ typedef long int __clock_t; -+__extension__ typedef unsigned int __id_t; -+typedef struct _IO_FILE FILE; -+typedef struct _IO_FILE __FILE; -+typedef struct { -+ int __count; -+ union { -+ unsigned int __wch; -+ char __wchb[4]; -+ } -+ __value; -+} __mbstate_t; -+typedef struct { -+ __off_t __pos; -+ __mbstate_t __state; -+} _G_fpos_t; -+typedef struct { -+ __off64_t __pos; -+ __mbstate_t __state; -+} _G_fpos64_t; -+typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); -+typedef struct _IO_FILE _IO_FILE; -+extern struct _IO_FILE_plus _IO_2_1_stderr_; -+extern int fputs (__const char *__restrict __s, FILE * __restrict __stream); -+extern char *strstr (__const char *__haystack, __const char *__needle) -+ __attribute__ ((__nonnull__ (1, 2))); -+ extern char *rindex (__const char *__s, int __c) __attribute__ ((__nonnull__ (1))); -+extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__)) -+ __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -+ char *mystrlwr (char *string); -+ char *m_replace_filename (const char *path, const char *filename); -+ typedef struct LINE { -+ char *text; -+ struct LINE *next; -+ int flags; -+ } LINE; -+typedef struct TOC { -+ char *text; -+ char *alt; -+ struct TOC *next; -+ int root; -+ int texinfoable; -+ int htmlable; -+ int otherfile; -+} TOC; -+static int _empty_count; -+extern char *_word_substitution[256]; -+static void _output_sorted_nested_toc (TOC ** list, unsigned int num_items); -+static char *_do_text_substitution (char *input); -+static int _toc_scmp (const void *e1, const void *e2) -+{ -+ TOC *t1 = *((TOC **) e1); -+ TOC *t2 = *((TOC **) e2); -+ return mystricmp (t1->text, t2->text); -+} -+static void _output_buffered_text (void) { if (_empty_count) ; } -+void _post_process_filename (char *filename) -+{ -+ int code_scanning = 0; -+ char *new_filename, *p; -+ char *line; -+ FILE *f1 = 0, *f2 = 0; -+ if (!new_filename || strlen (new_filename) < 2) -+ new_filename[strlen (filename) - 1] = 'x'; -+ if (!f1 || !f2) -+ while ((line = m_fgets (f1))) -+ { -+ line = _do_text_substitution (line); -+ fputs (line, f2); -+ } -+ if (remove (filename)) -+ cancel: -+ if (f1) -+ if (f2) -+ if (new_filename) -+ ; -+} -+static void _close_html_file (FILE * file) -+{ -+ int f; -+ for (f = 0; _word_substitution[f]; f++) -+ ; -+} -+static __attribute__((always_inline)) -+char * _do_text_substitution (char *input) -+{ -+ int start, end, middle, f; -+ char *temp, *found, *reader; -+ for (f = 0; _word_substitution[f]; f++) -+ { -+ reader = input; -+ while ((found = strstr (reader, _word_substitution[f]))) -+ { -+ start = found - input; -+ input = temp; -+ reader = temp + start + middle; -+ } -+ } -+ return input; -+} ---- gcc/testsuite/gcc.dg/noncompile/init-5.c (revision 0) -+++ gcc/testsuite/gcc.dg/noncompile/init-5.c (revision 144237) -@@ -0,0 +1,4 @@ -+/* Test for ICE after syntax error in initializer with range -+ designator: PR 35446. */ -+ -+int a[2][2] = { [0 ... 1] = { ; } }; /* { dg-error "expected expression" } */ ---- gcc/testsuite/gcc.dg/init-bad-4.c (revision 144236) -+++ gcc/testsuite/gcc.dg/init-bad-4.c (revision 144237) -@@ -2,4 +2,4 @@ - /* Origin: Richard Guenther */ - /* { dg-do compile } */ - --struct A { } a = (struct A) {{ (X)0 }}; /* { dg-error "no members|extra brace|near|undeclared|constant|compound" } */ -+struct A { } a = (struct A) {{ (X)0 }}; /* { dg-error "no members|extra brace|near|undeclared|constant|compound|excess" } */ ---- gcc/testsuite/gcc.dg/vect/vect-outer-5.c (revision 144236) -+++ gcc/testsuite/gcc.dg/vect/vect-outer-5.c (revision 144237) -@@ -1,4 +1,4 @@ --/* { dg-require-effective-target vect_int } */ -+/* { dg-require-effective-target vect_float } */ - - #include - #include ---- gcc/testsuite/gcc.dg/vect/vect-outer-6.c (revision 144236) -+++ gcc/testsuite/gcc.dg/vect/vect-outer-6.c (revision 144237) -@@ -1,4 +1,4 @@ --/* { dg-require-effective-target vect_int } */ -+/* { dg-require-effective-target vect_float } */ - - #include - #include ---- gcc/testsuite/ChangeLog (revision 144236) -+++ gcc/testsuite/ChangeLog (revision 144237) -@@ -1,3 +1,24 @@ -+2009-02-17 Richard Guenther -+ -+ PR tree-optimization/39202 -+ * gcc.c-torture/compile/pr39202.c: New testcase. -+ -+2009-02-17 Richard Guenther -+ -+ PR tree-optimization/39204 -+ * gcc.dg/torture/pr39204.c: New testcase. -+ -+2009-02-17 Bingfeng Mei -+ -+ * gcc.dg/vect/vect-outer-5.c: Require vect_float support. -+ * gcc.dg/vect/vect-outer-6.c: Ditto. -+ -+2009-02-16 Joseph Myers -+ -+ PR c/35446 -+ * gcc.dg/noncompile/init-5.c: New test. -+ * gcc.dg/init-bad-4.c: Adjust expected errors. -+ - 2009-02-16 H.J. Lu - - PR target/37049 ---- gcc/langhooks.c (revision 144236) -+++ gcc/langhooks.c (revision 144237) -@@ -437,7 +437,7 @@ lhd_print_error_function (diagnostic_con - while (block && TREE_CODE (block) == BLOCK) - block = BLOCK_SUPERCONTEXT (block); - -- if (TREE_CODE (block) == FUNCTION_DECL) -+ if (block && TREE_CODE (block) == FUNCTION_DECL) - fndecl = block; - abstract_origin = NULL; - } ---- gcc/tree-ssa-pre.c (revision 144236) -+++ gcc/tree-ssa-pre.c (revision 144237) -@@ -1707,6 +1707,9 @@ phi_translate_1 (pre_expr expr, bitmap_s - tree def = PHI_ARG_DEF (phi, e->dest_idx); - pre_expr newexpr; - -+ if (TREE_CODE (def) == SSA_NAME) -+ def = VN_INFO (def)->valnum; -+ - /* Handle constant. */ - if (is_gimple_min_invariant (def)) - return get_or_alloc_expr_for_constant (def); ---- gcc/tree-ssa-structalias.c (revision 144236) -+++ gcc/tree-ssa-structalias.c (revision 144237) -@@ -3405,8 +3405,8 @@ do_structure_copy (tree lhsop, tree rhso - { - if (!do_simple_structure_copy (lhs, rhs, MIN (lhssize, rhssize))) - { -- lhs.var = collapse_rest_of_var (lhs.var); -- rhs.var = collapse_rest_of_var (rhs.var); -+ lhs.var = collapse_rest_of_var (get_varinfo_fc (lhs.var)->id); -+ rhs.var = collapse_rest_of_var (get_varinfo_fc (rhs.var)->id); - lhs.offset = 0; - rhs.offset = 0; - lhs.type = SCALAR; -@@ -4935,6 +4935,7 @@ find_what_p_points_to (tree p) - { - pi->pt_vars = NULL; - if (pruned > 0 -+ && !pi->pt_null - && pi->is_dereferenced - && warn_strict_aliasing > 0 - && !SSA_NAME_IS_DEFAULT_DEF (p)) ---- gcc/c-parser.c (revision 144236) -+++ gcc/c-parser.c (revision 144237) -@@ -3036,6 +3036,7 @@ c_parser_braced_init (c_parser *parser, - ret.value = error_mark_node; - ret.original_code = ERROR_MARK; - c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, "expected %<}%>"); -+ pop_init_level (0); - return ret; - } - c_parser_consume_token (parser); ---- gcc/config/soft-fp/double.h (revision 144236) -+++ gcc/config/soft-fp/double.h (revision 144237) -@@ -1,6 +1,7 @@ - /* Software floating-point emulation. - Definitions for IEEE Double Precision -- Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc. -+ Copyright (C) 1997, 1998, 1999, 2006, 2007, 2008, 2009 -+ Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Richard Henderson (rth@cygnus.com), - Jakub Jelinek (jj@ultra.linux.cz), -@@ -203,13 +204,13 @@ union _FP_UNION_D - - #define FP_UNPACK_SEMIRAW_D(X,val) \ - do { \ -- _FP_UNPACK_RAW_2(1,X,val); \ -+ _FP_UNPACK_RAW_1(D,X,val); \ - _FP_UNPACK_SEMIRAW(D,1,X); \ - } while (0) - - #define FP_UNPACK_SEMIRAW_DP(X,val) \ - do { \ -- _FP_UNPACK_RAW_2_P(1,X,val); \ -+ _FP_UNPACK_RAW_1_P(D,X,val); \ - _FP_UNPACK_SEMIRAW(D,1,X); \ - } while (0) - diff --git a/gcc44-pr39240.patch b/gcc44-pr39240.patch new file mode 100644 index 0000000..45d0827 --- /dev/null +++ b/gcc44-pr39240.patch @@ -0,0 +1,156 @@ +2009-02-19 Jakub Jelinek + + PR target/39240 + * calls.c (expand_call): Clear try_tail_call if caller and callee + disagree in promotion of function return value. + + * gcc.c-torture/execute/pr39240.c: New test. + +--- gcc/calls.c.jj 2009-02-06 11:17:16.000000000 +0100 ++++ gcc/calls.c 2009-02-19 13:36:41.000000000 +0100 +@@ -2333,6 +2333,37 @@ expand_call (tree exp, rtx target, int i + || !lang_hooks.decls.ok_for_sibcall (fndecl)) + try_tail_call = 0; + ++ /* Check if caller and callee disagree in promotion of function ++ return value. */ ++ if (try_tail_call) ++ { ++ enum machine_mode caller_mode, caller_promoted_mode; ++ enum machine_mode callee_mode, callee_promoted_mode; ++ int caller_unsignedp, callee_unsignedp; ++ tree caller_res = DECL_RESULT (current_function_decl); ++ ++ caller_unsignedp = TYPE_UNSIGNED (TREE_TYPE (caller_res)); ++ caller_mode = caller_promoted_mode = DECL_MODE (caller_res); ++ callee_unsignedp = TYPE_UNSIGNED (TREE_TYPE (funtype)); ++ callee_mode = callee_promoted_mode = TYPE_MODE (TREE_TYPE (funtype)); ++ if (targetm.calls.promote_function_return (TREE_TYPE (current_function_decl))) ++ caller_promoted_mode ++ = promote_mode (TREE_TYPE (caller_res), caller_mode, ++ &caller_unsignedp, 1); ++ if (targetm.calls.promote_function_return (funtype)) ++ callee_promoted_mode ++ = promote_mode (TREE_TYPE (funtype), callee_mode, ++ &callee_unsignedp, 1); ++ if (caller_mode != VOIDmode ++ && (caller_promoted_mode != callee_promoted_mode ++ || ((caller_mode != caller_promoted_mode ++ || callee_mode != callee_promoted_mode) ++ && (caller_unsignedp != callee_unsignedp ++ || GET_MODE_BITSIZE (caller_mode) ++ < GET_MODE_BITSIZE (callee_mode))))) ++ try_tail_call = 0; ++ } ++ + /* Ensure current function's preferred stack boundary is at least + what we need. Stack alignment may also increase preferred stack + boundary. */ +--- gcc/testsuite/gcc.c-torture/execute/pr39240.c.jj 2009-02-19 13:38:23.000000000 +0100 ++++ gcc/testsuite/gcc.c-torture/execute/pr39240.c 2009-02-19 13:39:14.000000000 +0100 +@@ -0,0 +1,105 @@ ++/* PR target/39240 */ ++ ++extern void abort (void); ++ ++__attribute__ ((noinline)) ++static int foo1 (int x) ++{ ++ return x; ++} ++ ++__attribute__ ((noinline)) ++unsigned int bar1 (int x) ++{ ++ return foo1 (x + 6); ++} ++ ++volatile unsigned long l1 = (unsigned int) -4; ++ ++__attribute__ ((noinline)) ++static short int foo2 (int x) ++{ ++ return x; ++} ++ ++__attribute__ ((noinline)) ++unsigned short int bar2 (int x) ++{ ++ return foo2 (x + 6); ++} ++ ++volatile unsigned long l2 = (unsigned short int) -4; ++ ++__attribute__ ((noinline)) ++static signed char foo3 (int x) ++{ ++ return x; ++} ++ ++__attribute__ ((noinline)) ++unsigned char bar3 (int x) ++{ ++ return foo3 (x + 6); ++} ++ ++volatile unsigned long l3 = (unsigned char) -4; ++ ++__attribute__ ((noinline)) ++static unsigned int foo4 (int x) ++{ ++ return x; ++} ++ ++__attribute__ ((noinline)) ++int bar4 (int x) ++{ ++ return foo4 (x + 6); ++} ++ ++volatile unsigned long l4 = (int) -4; ++ ++__attribute__ ((noinline)) ++static unsigned short int foo5 (int x) ++{ ++ return x; ++} ++ ++__attribute__ ((noinline)) ++short int bar5 (int x) ++{ ++ return foo5 (x + 6); ++} ++ ++volatile unsigned long l5 = (short int) -4; ++ ++__attribute__ ((noinline)) ++static unsigned char foo6 (int x) ++{ ++ return x; ++} ++ ++__attribute__ ((noinline)) ++signed char bar6 (int x) ++{ ++ return foo6 (x + 6); ++} ++ ++volatile unsigned long l6 = (signed char) -4; ++ ++int ++main (void) ++{ ++ if (bar1 (-10) != l1) ++ abort (); ++ if (bar2 (-10) != l2) ++ abort (); ++ if (bar3 (-10) != l3) ++ abort (); ++ if (bar4 (-10) != l4) ++ abort (); ++ if (bar5 (-10) != l5) ++ abort (); ++ if (bar6 (-10) != l6) ++ abort (); ++ return 0; ++} diff --git a/sources b/sources index 2568471..339d4ed 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz -0f5cb535b5450a8d61b14f690700a54c gcc-4.4.0-20090216.tar.bz2 +67b7f59414d468df2d68a8b6dadd0153 gcc-4.4.0-20090219.tar.bz2 716b7a0823f96c9d02c1703a9c47d387 cloog-ppl-0.15.tar.gz