diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-10-16 16:29:43 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2009-10-16 16:29:43 +0000 |
commit | 84fa5995d9ab2ae9bbea6dbfa9ecb8c53a417c0b (patch) | |
tree | fac84f2a88dc3672aa1b7ed3b9000313f794a658 | |
parent | f996b4c6866eff70afeade186c62895a31fc9303 (diff) |
svn merge -r152856:152901 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_4-branch@152909 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/DATESTAMP | 2 | ||||
-rw-r--r-- | gcc/config/pa/linux-atomic.c | 5 | ||||
-rw-r--r-- | gcc/config/pa/t-hpux-shlib | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 42 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr41182-1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr41634.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr41661.c | 20 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr41573.c | 15 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr41555.c | 119 |
10 files changed, 237 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e7e30cf071a..537a42a777a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2009-10-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + Backport from mainline + 2009-09-17 Michael Haubenwallner <michael.haubenwallner@salomon.at> + + PR target/40913 + * config/pa/t-hpux-shlib: Set soname in libgcc_s.sl. + + Backport from mainline + 2009-05-05 Ben Elliston <bje@au.ibm.com> + + * config/pa/linux-atomic.c: Eliminate conditional include of + errno.h on non-LP64 systems to simplify build requirements. + 2009-10-15 Jakub Jelinek <jakub@redhat.com> PR debug/41717 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e144899879e..fbd7ed66eab 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20091015 +20091016 diff --git a/gcc/config/pa/linux-atomic.c b/gcc/config/pa/linux-atomic.c index 00fdf526556..38e87297752 100644 --- a/gcc/config/pa/linux-atomic.c +++ b/gcc/config/pa/linux-atomic.c @@ -24,14 +24,9 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ -/* FIXME: work around build failure for hppa64-linux-gnu target. */ -#ifndef _LP64 -#include <errno.h> -#else #define EFAULT 14 #define EBUSY 16 #define ENOSYS 251 -#endif /* All PA-RISC implementations supported by linux have strongly ordered loads and stores. Only cache flushes and purges can be diff --git a/gcc/config/pa/t-hpux-shlib b/gcc/config/pa/t-hpux-shlib index d609d3f8624..3d0b65b87e0 100644 --- a/gcc/config/pa/t-hpux-shlib +++ b/gcc/config/pa/t-hpux-shlib @@ -8,6 +8,7 @@ SHLIB_DIR = @multilib_dir@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ + -Wl,+h -Wl,$(SHLIB_SONAME) \ -o $(SHLIB_DIR)/$(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) && \ rm -f $(SHLIB_DIR)/$(SHLIB_SONAME) && \ if [ -f $(SHLIB_DIR)/$(SHLIB_NAME) ]; then \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ede94c6da65..57f845471f0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,45 @@ +2009-10-16 H.J. Lu <hongjiu.lu@intel.com> + + * g++.dg/debug/dwarf2/template-params-7.C: Removed. + * gfortran.dg/fmt_error_9.f: Likewise. + +2009-10-15 H.J. Lu <hongjiu.lu@intel.com> + + Backport from mainline: + 2009-10-13 Martin Jambor <mjambor@suse.cz> + + * gcc.c-torture/compile/pr41661.c: New test. + + 2009-10-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libgfortran/41683 + * gfortran.dg/fmt_error_9.f: Add check for repeat count after P. + + 2009-10-12 Dodji Seketeli <dodji@redhat.com> + + PR c++/41570 + * g++.dg/debug/dwarf2/template-params-7.C: New test. + + 2009-10-11 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/41555 + * gcc.dg/torture/pr41555.c: New testcase. + + 2009-10-09 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/41634 + * gcc.c-torture/compile/pr41634.c: New testcase. + + 2009-10-08 Michael Matz <matz@suse.de> + + PR middle-end/41573 + * gcc.dg/pr41573.c: New test. + + 2009-10-07 Joseph Myers <joseph@codesourcery.com> + + PR c/41182 + * gcc.c-torture/compile/pr41182-1.c: New. + 2009-10-15 Jakub Jelinek <jakub@redhat.com> PR debug/41717 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c b/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c new file mode 100644 index 00000000000..017174938b3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr41182-1.c @@ -0,0 +1,6 @@ +typedef long unsigned int size_t; +int _lae_process_opts(char *pr, char *pe) +{ + return (strlen ("on") < ((size_t) ((pe-&pr[2])>(strlen("on")) + ? (pe-&pr[2]) : (strlen("on"))))); +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41634.c b/gcc/testsuite/gcc.c-torture/compile/pr41634.c new file mode 100644 index 00000000000..976e463e2ba --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr41634.c @@ -0,0 +1,19 @@ +extern int _xgetw(); +extern int foo(char*); + +void test_readmode( int ascii_mode ) +{ + static const char outbuffer[] + = "0,1,2,3,4,5,6,7,8,9\r\n\r\nA,B,C,D,E\r\nX,Y,Z"; + char buffer[2*512 +256]; + int i, j, ao; + unsigned int fp; + + foo(buffer); + + for (i=0, j=0; i<6; i++) { + if (ao==0 || outbuffer[fp-3+i] != '\r') + buffer[j++] = outbuffer[fp-3+i]; + } + _xgetw(); +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41661.c b/gcc/testsuite/gcc.c-torture/compile/pr41661.c new file mode 100644 index 00000000000..658e4288b8d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr41661.c @@ -0,0 +1,20 @@ +/* PR tree-optimization/41661 */ +/* { dg-do compile } */ +/* { dg-options "-fno-early-inlining" } */ + +int g; + +void foo (int x) +{ + g = x; +} + +void bar (double d) +{ + foo (d == 1); +} + +void baz (int a) +{ + bar (1); +} diff --git a/gcc/testsuite/gcc.dg/pr41573.c b/gcc/testsuite/gcc.dg/pr41573.c new file mode 100644 index 00000000000..52961db8f22 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr41573.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +__inline __attribute__ ((__always_inline__)) char * +strcpy (char *__dest, __const char *__src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + +const char* get_attr(unsigned attr) +{ + static char tmp[256]; + + strcpy(tmp, ""); + return tmp; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr41555.c b/gcc/testsuite/gcc.dg/torture/pr41555.c new file mode 100644 index 00000000000..c201fda0cea --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr41555.c @@ -0,0 +1,119 @@ +/* { dg-do run } */ +/* { dg-options "-std=c99" } */ + +#include <stdint.h> +#include <limits.h> + +extern void abort (void); + +static uint64_t safe_div_func_uint64_t_u_u (uint64_t _ui1, uint64_t _ui2) +{ + if (_ui2==0) return _ui1; + return _ui1 / _ui2; +} + +static int64_t safe_div_func_int64_t_s_s (int64_t _si1, int64_t _si2) +{ + if (_si2==0 || (_si1==INT64_MIN && _si2==-1)) return _si1; + return _si1 / _si2; +} + +#define safe_add_macro_int8_t_s_s(si1,si2) \ + ((((((int8_t)(si1))>((int8_t)0)) && (((int8_t)(si2))>((int8_t)0)) && (((int8_t)(si1)) > ((INT8_MAX)-((int8_t)(si2))))) \ + || ((((int8_t)(si1))<((int8_t)0)) && (((int8_t)(si2))<((int8_t)0)) && (((int8_t)(si1)) < ((INT8_MIN)-((int8_t)(si2)))))) \ + ? ((int8_t)(si1)) \ + : (((int8_t)(si1)) + ((int8_t)(si2))) \ + ) + +static int8_t +safe_add_func_int8_t_s_s(int8_t _si1, int8_t _si2) +{ + return safe_add_macro_int8_t_s_s(_si1,_si2); +} + +#define safe_rshift_macro_uint64_t_u_s(left,right) \ + (((((int)(right)) < ((uint64_t)0)) \ + || (((int)(right)) >= sizeof(uint64_t)*CHAR_BIT)) \ + ? ((uint64_t)(left)) \ + : (((uint64_t)(left)) >> ((int)(right)))) + +static uint64_t +safe_rshift_func_uint64_t_u_s(uint64_t _left, int _right) +{ + return safe_rshift_macro_uint64_t_u_s(_left,_right); +} + +#define safe_mul_macro_int32_t_s_s(si1,si2) \ + ((((((int32_t)(si1)) > ((int32_t)0)) && (((int32_t)(si2)) > ((int32_t)0)) && (((int32_t)(si1)) > ((INT32_MAX) / ((int32_t)(si2))))) || \ + ((((int32_t)(si1)) > ((int32_t)0)) && (((int32_t)(si2)) <= ((int32_t)0)) && (((int32_t)(si2)) < ((INT32_MIN) / ((int32_t)(si1))))) || \ + ((((int32_t)(si1)) <= ((int32_t)0)) && (((int32_t)(si2)) > ((int32_t)0)) && (((int32_t)(si1)) < ((INT32_MIN) / ((int32_t)(si2))))) || \ + ((((int32_t)(si1)) <= ((int32_t)0)) && (((int32_t)(si2)) <= ((int32_t)0)) && (((int32_t)(si1)) != ((int32_t)0)) && (((int32_t)(si2)) < ((INT32_MAX) / ((int32_t)(si1)))))) \ + ? ((int32_t)(si1)) \ + : ((int32_t)(si1)) * ((int32_t)(si2))) + +static int32_t +safe_mul_func_int32_t_s_s (int32_t _si1, int32_t _si2) +{ + return safe_mul_macro_int32_t_s_s(_si1,_si2); +} + +static int8_t g_39; +static volatile uint8_t g_46; +static uint8_t g_47; +static uint8_t *g_62; +static uint8_t g_79; +static int8_t g_101 = -1L; +static uint8_t *g_114; +static uint8_t *g_126; +static uint8_t g_133; + +static uint16_t func_35 (int32_t * p_36, uint64_t p_37, uint32_t p_38); +static uint16_t func_35 (int32_t * p_36, uint64_t p_37, uint32_t p_38) +{ + if (g_62 != 0) + abort (); + for (g_39 = 1; g_39 < 0; g_39 = 1) + { + } + return 1; +} + +static int32_t func_19 (int32_t p_20); +static int32_t func_19 (int32_t p_20) +{ + if (1 != + safe_div_func_uint64_t_u_u ((safe_div_func_int64_t_s_s (p_20, 1)), + g_101)) + { + func_35 (0, 1 <= (safe_add_func_int8_t_s_s (g_47, g_46)) > p_20 < 1, 1); + g_133 = 1; + if (g_114 != 0) + abort (); + if (g_126 != 0) + abort (); + } + return 1; +} + +static uint8_t func_2 (int32_t p_6); +static uint8_t func_2 (int32_t p_6) +{ + for (1; p_6 > 1; 1) + return 0; + func_19 (g_79); + if (safe_mul_func_int32_t_s_s + ((0, 1 < (safe_rshift_func_uint64_t_u_s (1 ^ p_6, 1))), + (func_35 (&p_6, 1, 1) < 1))) + { + } + return 1; +} + +int main (void) +{ + func_2 (1); + if (g_133 != 1) + abort (); + return 0; +} + |