4.1.2-34
This commit is contained in:
parent
70a3a1d063
commit
d8d9cbe2d6
@ -1 +1 @@
|
||||
gcc-4.1.2-20070925.tar.bz2
|
||||
gcc-4.1.2-20071124.tar.bz2
|
||||
|
@ -1,18 +1,7 @@
|
||||
2007-09-06 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* decl2.c (get_guard): Copy visibility from the guarded variable.
|
||||
* g++.dg/ext/visibility/guard1.C: New test.
|
||||
|
||||
--- gcc/cp/decl2.c (revision 128225)
|
||||
+++ gcc/cp/decl2.c (revision 128226)
|
||||
@@ -2215,6 +2215,8 @@ get_guard (tree decl)
|
||||
DECL_ONE_ONLY (guard) = DECL_ONE_ONLY (decl);
|
||||
if (TREE_PUBLIC (decl))
|
||||
DECL_WEAK (guard) = DECL_WEAK (decl);
|
||||
+ DECL_VISIBILITY (guard) = DECL_VISIBILITY (decl);
|
||||
+ DECL_VISIBILITY_SPECIFIED (guard) = DECL_VISIBILITY_SPECIFIED (decl);
|
||||
|
||||
DECL_ARTIFICIAL (guard) = 1;
|
||||
DECL_IGNORED_P (guard) = 1;
|
||||
--- gcc/testsuite/g++.dg/ext/visibility/guard1.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/visibility/guard1.C (revision 128226)
|
||||
@@ -0,0 +1,29 @@
|
||||
|
957
gcc41-java-arm1.patch
Normal file
957
gcc41-java-arm1.patch
Normal file
@ -0,0 +1,957 @@
|
||||
2007-05-18 Aurelien Jarno <aurelien@aurel32.net>
|
||||
|
||||
* src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
|
||||
from (ffi_prep_closure): ... this.
|
||||
(FFI_INIT_TRAMPOLINE): Adjust.
|
||||
|
||||
2005-12-31 Phil Blundell <pb@reciva.com>
|
||||
|
||||
* src/arm/ffi.c (ffi_prep_incoming_args_SYSV,
|
||||
ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
|
||||
* src/arm/sysv.S(ffi_closure_SYSV): Likewise.
|
||||
* src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
|
||||
(FFI_CLOSURES): Enable closure support.
|
||||
|
||||
2007-07-03 Andrew Haley <aph@hedges.billgatliff.com>
|
||||
|
||||
* testsuite/libffi.call/cls_multi_ushort.c,
|
||||
testsuite/libffi.call/cls_align_uint16.c,
|
||||
testsuite/libffi.call/nested_struct1.c,
|
||||
testsuite/libffi.call/nested_struct3.c,
|
||||
testsuite/libffi.call/cls_7_1_byte.c,
|
||||
testsuite/libffi.call/cls_double.c,
|
||||
testsuite/libffi.call/cls_sint.c,
|
||||
testsuite/libffi.call/cls_20byte1.c,
|
||||
testsuite/libffi.call/cls_multi_sshortchar.c,
|
||||
testsuite/libffi.call/cls_align_sint64.c,
|
||||
testsuite/libffi.call/cls_3byte2.c,
|
||||
testsuite/libffi.call/cls_multi_schar.c,
|
||||
testsuite/libffi.call/cls_multi_uchar.c,
|
||||
testsuite/libffi.call/cls_19byte.c,
|
||||
testsuite/libffi.call/cls_9byte1.c,
|
||||
testsuite/libffi.call/cls_align_float.c,
|
||||
testsuite/libffi.call/closure_fn1.c,
|
||||
testsuite/libffi.call/problem1.c,
|
||||
testsuite/libffi.call/closure_fn3.c,
|
||||
testsuite/libffi.call/cls_sshort.c,
|
||||
testsuite/libffi.call/closure_fn5.c,
|
||||
testsuite/libffi.call/cls_align_double.c,
|
||||
testsuite/libffi.call/cls_2byte.c,
|
||||
testsuite/libffi.call/nested_struct.c,
|
||||
testsuite/libffi.call/cls_4byte.c,
|
||||
testsuite/libffi.call/cls_6byte.c,
|
||||
testsuite/libffi.call/cls_8byte.c,
|
||||
testsuite/libffi.call/cls_multi_sshort.c,
|
||||
testsuite/libffi.call/cls_align_uint32.c,
|
||||
testsuite/libffi.call/cls_align_sint16.c,
|
||||
testsuite/libffi.call/cls_float.c,
|
||||
testsuite/libffi.call/cls_20byte.c,
|
||||
testsuite/libffi.call/cls_5_1_byte.c,
|
||||
testsuite/libffi.call/nested_struct2.c,
|
||||
testsuite/libffi.call/cls_24byte.c,
|
||||
testsuite/libffi.call/cls_64byte.c,
|
||||
testsuite/libffi.call/cls_uint.c,
|
||||
testsuite/libffi.call/cls_multi_ushortchar.c,
|
||||
testsuite/libffi.call/cls_schar.c,
|
||||
testsuite/libffi.call/cls_uchar.c,
|
||||
testsuite/libffi.call/cls_align_uint64.c,
|
||||
testsuite/libffi.call/cls_ulonglong.c,
|
||||
testsuite/libffi.call/cls_align_longdouble.c,
|
||||
testsuite/libffi.call/cls_1_1byte.c,
|
||||
testsuite/libffi.call/cls_12byte.c,
|
||||
testsuite/libffi.call/cls_3_1byte.c,
|
||||
testsuite/libffi.call/cls_3byte1.c,
|
||||
testsuite/libffi.call/cls_4_1byte.c,
|
||||
testsuite/libffi.call/cls_6_1_byte.c,
|
||||
testsuite/libffi.call/cls_16byte.c,
|
||||
testsuite/libffi.call/cls_18byte.c,
|
||||
testsuite/libffi.call/closure_fn0.c,
|
||||
testsuite/libffi.call/cls_9byte2.c,
|
||||
testsuite/libffi.call/closure_fn2.c,
|
||||
testsuite/libffi.call/closure_fn4.c,
|
||||
testsuite/libffi.call/cls_ushort.c,
|
||||
testsuite/libffi.call/closure_fn6.c,
|
||||
testsuite/libffi.call/cls_5byte.c,
|
||||
testsuite/libffi.call/cls_align_pointer.c,
|
||||
testsuite/libffi.call/cls_7byte.c,
|
||||
testsuite/libffi.call/cls_align_sint32.c,
|
||||
testsuite/libffi.special/unwindtest.cc: Enable for ARM.
|
||||
|
||||
--- libffi/src/arm/ffitarget.h.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/src/arm/ffitarget.h 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -40,7 +40,8 @@ typedef enum ffi_abi {
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
-#define FFI_CLOSURES 0
|
||||
+#define FFI_CLOSURES 1
|
||||
+#define FFI_TRAMPOLINE_SIZE 20
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
#endif
|
||||
--- libffi/src/arm/ffi.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/src/arm/ffi.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -168,3 +168,122 @@ void ffi_call(ffi_cif *cif, void (*fn)()
|
||||
break;
|
||||
}
|
||||
}
|
||||
+
|
||||
+/** private members **/
|
||||
+
|
||||
+static void ffi_prep_incoming_args_SYSV (char *stack, void **ret,
|
||||
+ void** args, ffi_cif* cif);
|
||||
+
|
||||
+void ffi_closure_SYSV (ffi_closure *);
|
||||
+
|
||||
+/* This function is jumped to by the trampoline */
|
||||
+
|
||||
+unsigned int
|
||||
+ffi_closure_SYSV_inner (closure, respp, args)
|
||||
+ ffi_closure *closure;
|
||||
+ void **respp;
|
||||
+ void *args;
|
||||
+{
|
||||
+ // our various things...
|
||||
+ ffi_cif *cif;
|
||||
+ void **arg_area;
|
||||
+
|
||||
+ cif = closure->cif;
|
||||
+ arg_area = (void**) alloca (cif->nargs * sizeof (void*));
|
||||
+
|
||||
+ /* this call will initialize ARG_AREA, such that each
|
||||
+ * element in that array points to the corresponding
|
||||
+ * value on the stack; and if the function returns
|
||||
+ * a structure, it will re-set RESP to point to the
|
||||
+ * structure return address. */
|
||||
+
|
||||
+ ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
|
||||
+
|
||||
+ (closure->fun) (cif, *respp, arg_area, closure->user_data);
|
||||
+
|
||||
+ return cif->flags;
|
||||
+}
|
||||
+
|
||||
+/*@-exportheader@*/
|
||||
+static void
|
||||
+ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
|
||||
+ void **avalue, ffi_cif *cif)
|
||||
+/*@=exportheader@*/
|
||||
+{
|
||||
+ register unsigned int i;
|
||||
+ register void **p_argv;
|
||||
+ register char *argp;
|
||||
+ register ffi_type **p_arg;
|
||||
+
|
||||
+ argp = stack;
|
||||
+
|
||||
+ if ( cif->flags == FFI_TYPE_STRUCT ) {
|
||||
+ *rvalue = *(void **) argp;
|
||||
+ argp += 4;
|
||||
+ }
|
||||
+
|
||||
+ p_argv = avalue;
|
||||
+
|
||||
+ for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
|
||||
+ {
|
||||
+ size_t z;
|
||||
+
|
||||
+ /* Align if necessary */
|
||||
+ if ((sizeof(int) - 1) & (unsigned) argp) {
|
||||
+ argp = (char *) ALIGN(argp, sizeof(int));
|
||||
+ }
|
||||
+
|
||||
+ z = (*p_arg)->size;
|
||||
+
|
||||
+ /* because we're little endian, this is what it turns into. */
|
||||
+
|
||||
+ *p_argv = (void*) argp;
|
||||
+
|
||||
+ p_argv++;
|
||||
+ argp += z;
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+/* How to make a trampoline. */
|
||||
+
|
||||
+#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
+({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
+ unsigned int __fun = (unsigned int)(FUN); \
|
||||
+ unsigned int __ctx = (unsigned int)(CTX); \
|
||||
+ *(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \
|
||||
+ *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[12] = __ctx; \
|
||||
+ *(unsigned int*) &__tramp[16] = __fun; \
|
||||
+ register unsigned long _beg __asm ("a1") = (unsigned long) (&__tramp[0]); \
|
||||
+ register unsigned long _end __asm ("a2") = (unsigned long) (&__tramp[19]); \
|
||||
+ register unsigned long _flg __asm ("a3") = 0; \
|
||||
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
+ : "=r" (_beg) \
|
||||
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
+ })
|
||||
+
|
||||
+
|
||||
+/* the cif must already be prep'ed */
|
||||
+
|
||||
+ffi_status
|
||||
+ffi_prep_closure_loc (ffi_closure* closure,
|
||||
+ ffi_cif* cif,
|
||||
+ void (*fun)(ffi_cif*,void*,void**,void*),
|
||||
+ void *user_data,
|
||||
+ void *codeloc)
|
||||
+{
|
||||
+ FFI_ASSERT (cif->abi == FFI_SYSV);
|
||||
+
|
||||
+ FFI_INIT_TRAMPOLINE (&closure->tramp[0], \
|
||||
+ &ffi_closure_SYSV, \
|
||||
+ codeloc);
|
||||
+
|
||||
+ closure->cif = cif;
|
||||
+ closure->user_data = user_data;
|
||||
+ closure->fun = fun;
|
||||
+
|
||||
+ return FFI_OK;
|
||||
+}
|
||||
--- libffi/src/arm/sysv.S.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/src/arm/sysv.S 2007-09-06 14:08:26.000000000 +0200
|
||||
@@ -207,6 +207,54 @@ LSYM(Lepilogue):
|
||||
.ffi_call_SYSV_end:
|
||||
.size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
|
||||
|
||||
+/*
|
||||
+ unsigned int FFI_HIDDEN
|
||||
+ ffi_closure_SYSV_inner (closure, respp, args)
|
||||
+ ffi_closure *closure;
|
||||
+ void **respp;
|
||||
+ void *args;
|
||||
+*/
|
||||
+
|
||||
+ARM_FUNC_START ffi_closure_SYSV
|
||||
+ add ip, sp, #16
|
||||
+ stmfd sp!, {ip, lr}
|
||||
+ add r2, sp, #8
|
||||
+ sub sp, sp, #16
|
||||
+ str sp, [sp, #8]
|
||||
+ add r1, sp, #8
|
||||
+ bl ffi_closure_SYSV_inner
|
||||
+ cmp r0, #FFI_TYPE_INT
|
||||
+ beq .Lretint
|
||||
+ cmp r0, #FFI_TYPE_FLOAT
|
||||
+ beq .Lretfloat
|
||||
+ cmp r0, #FFI_TYPE_DOUBLE
|
||||
+ beq .Lretdouble
|
||||
+ cmp r0, #FFI_TYPE_LONGDOUBLE
|
||||
+ beq .Lretlongdouble
|
||||
+ cmp r0, #FFI_TYPE_SINT64
|
||||
+ beq .Lretlonglong
|
||||
+.Lclosure_epilogue:
|
||||
+ add sp, sp, #16
|
||||
+ ldmfd sp, {sp, pc}
|
||||
+.Lretint:
|
||||
+ ldr r0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretlonglong:
|
||||
+ ldr r0, [sp]
|
||||
+ ldr r1, [sp, #4]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretfloat:
|
||||
+ ldfs f0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretdouble:
|
||||
+ ldfd f0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.Lretlongdouble:
|
||||
+ ldfd f0, [sp]
|
||||
+ b .Lclosure_epilogue
|
||||
+.ffi_closure_SYSV_end:
|
||||
+ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
+
|
||||
#if defined __ELF__ && defined __linux__
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
--- libffi/testsuite/libffi.call/cls_multi_ushort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_ushort.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
unsigned short test_func_fn(unsigned short a1, unsigned short a2)
|
||||
--- libffi/testsuite/libffi.call/cls_align_uint16.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_uint16.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/nested_struct1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct1.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_16byte1 {
|
||||
--- libffi/testsuite/libffi.call/nested_struct3.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct3.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030911 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct A {
|
||||
--- libffi/testsuite/libffi.call/cls_7_1_byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_7_1_byte.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20050708 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_7byte {
|
||||
--- libffi/testsuite/libffi.call/cls_double.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_double.c 2007-09-06 14:07:30.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_double_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_sint.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_sint.c 2007-09-06 14:07:33.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031108 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_20byte1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_20byte1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -5,7 +5,9 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_20byte {
|
||||
--- libffi/testsuite/libffi.call/cls_multi_sshortchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_sshortchar.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
signed short test_func_fn(signed char a1, signed short a2,
|
||||
--- libffi/testsuite/libffi.call/cls_align_sint64.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_sint64.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_3byte2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_3byte2.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_3byte_1 {
|
||||
--- libffi/testsuite/libffi.call/cls_multi_schar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_schar.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <hos@tamanegi.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
signed char test_func_fn(signed char a1, signed char a2)
|
||||
--- libffi/testsuite/libffi.call/cls_multi_uchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_uchar.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
unsigned char test_func_fn(unsigned char a1, unsigned char a2,
|
||||
--- libffi/testsuite/libffi.call/cls_19byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_19byte.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030915 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_19byte {
|
||||
--- libffi/testsuite/libffi.call/cls_9byte1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_9byte1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030914 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_9byte {
|
||||
--- libffi/testsuite/libffi.call/cls_align_float.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_float.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/closure_fn1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
|
||||
--- libffi/testsuite/libffi.call/problem1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/problem1.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct my_ffi_struct {
|
||||
--- libffi/testsuite/libffi.call/closure_fn3.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn3.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void closure_test_fn3(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_sshort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_sshort.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031108 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_sshort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/closure_fn5.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn5.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031026 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
--- libffi/testsuite/libffi.call/cls_align_double.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_double.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -4,7 +4,9 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_2byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_2byte.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_2byte {
|
||||
--- libffi/testsuite/libffi.call/nested_struct.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct.c 2007-09-06 14:07:34.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_16byte1 {
|
||||
--- libffi/testsuite/libffi.call/cls_4byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_4byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
--- libffi/testsuite/libffi.call/cls_6byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_6byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,8 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_6byte {
|
||||
--- libffi/testsuite/libffi.call/cls_8byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_8byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_8byte {
|
||||
--- libffi/testsuite/libffi.call/cls_multi_sshort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_sshort.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
signed short test_func_fn(signed short a1, signed short a2)
|
||||
--- libffi/testsuite/libffi.call/cls_align_uint32.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_uint32.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_align_sint16.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_sint16.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_float.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_float.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_float_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_20byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_20byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_20byte {
|
||||
--- libffi/testsuite/libffi.call/cls_5_1_byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_5_1_byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20050708 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_5byte {
|
||||
--- libffi/testsuite/libffi.call/nested_struct2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/nested_struct2.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030911 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct A {
|
||||
--- libffi/testsuite/libffi.call/cls_24byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_24byte.c 2007-09-06 14:07:35.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_24byte {
|
||||
--- libffi/testsuite/libffi.call/cls_64byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_64byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_64byte {
|
||||
--- libffi/testsuite/libffi.call/cls_uint.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_uint.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uint_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_multi_ushortchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_multi_ushortchar.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: PR13221.
|
||||
Originator: <andreast@gcc.gnu.org> 20031129 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
unsigned short test_func_fn(unsigned char a1, unsigned short a2,
|
||||
--- libffi/testsuite/libffi.call/cls_schar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_schar.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,9 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031108 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_schar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_uchar.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_uchar.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_uchar_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_align_uint64.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_uint64.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,8 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_ulonglong.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_ulonglong.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_ulonglong_fn(ffi_cif* cif __UNUSED__, void* resp,
|
||||
--- libffi/testsuite/libffi.call/cls_align_longdouble.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_longdouble.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
--- libffi/testsuite/libffi.call/cls_1_1byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_1_1byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,9 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030902 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_1_1byte {
|
||||
--- libffi/testsuite/libffi.call/cls_12byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_12byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_12byte {
|
||||
--- libffi/testsuite/libffi.call/cls_3_1byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_3_1byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030902 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_3_1byte {
|
||||
--- libffi/testsuite/libffi.call/cls_3byte1.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_3byte1.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_3byte {
|
||||
--- libffi/testsuite/libffi.call/cls_4_1byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_4_1byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030902 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_4_1byte {
|
||||
--- libffi/testsuite/libffi.call/cls_6_1_byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_6_1_byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20050708 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_6byte {
|
||||
--- libffi/testsuite/libffi.call/cls_16byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_16byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_16byte {
|
||||
--- libffi/testsuite/libffi.call/cls_18byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_18byte.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030915 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_18byte {
|
||||
--- libffi/testsuite/libffi.call/closure_fn0.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn0.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,10 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+
|
||||
+
|
||||
+
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void
|
||||
--- libffi/testsuite/libffi.call/cls_9byte2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_9byte2.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030914 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_9byte {
|
||||
--- libffi/testsuite/libffi.call/closure_fn2.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn2.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void closure_test_fn2(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/closure_fn4.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/closure_fn4.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -6,7 +6,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20031026 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
|
||||
#include "ffitest.h"
|
||||
|
||||
--- libffi/testsuite/libffi.call/cls_ushort.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_ushort.c 2007-09-06 14:07:37.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
static void cls_ret_ushort_fn(ffi_cif* cif __UNUSED__, void* resp, void** args,
|
||||
--- libffi/testsuite/libffi.call/cls_5byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_5byte.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_5byte {
|
||||
--- libffi/testsuite/libffi.call/cls_align_pointer.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_pointer.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.call/cls_7byte.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_7byte.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
PR: none.
|
||||
Originator: <andreast@gcc.gnu.org> 20030828 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_7byte {
|
||||
--- libffi/testsuite/libffi.call/cls_align_sint32.c.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.call/cls_align_sint32.c 2007-09-06 14:07:38.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: <hos@tamanegi.org> 20031203 */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitest.h"
|
||||
|
||||
typedef struct cls_struct_align {
|
||||
--- libffi/testsuite/libffi.special/unwindtest.cc.jj 2007-09-06 14:05:09.000000000 +0200
|
||||
+++ libffi/testsuite/libffi.special/unwindtest.cc 2007-09-06 14:07:39.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
PR: none.
|
||||
Originator: Jeff Sturm <jsturm@one-point.com> */
|
||||
|
||||
-/* { dg-do run { xfail mips64*-*-* arm*-*-* strongarm*-*-* xscale*-*-* } } */
|
||||
+/* { dg-do run { xfail mips64*-*-* } } */
|
||||
#include "ffitestcxx.h"
|
||||
|
||||
void
|
114
gcc41-java-arm2.patch
Normal file
114
gcc41-java-arm2.patch
Normal file
@ -0,0 +1,114 @@
|
||||
2007-07-13 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* libgcj.ver: Add __gcj_personality_sj0.
|
||||
|
||||
2007-07-11 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.host (arm*-linux-gnu): New.
|
||||
* sysdep/arm/locks.h: New.
|
||||
|
||||
--- libjava/configure.host (revision 126621)
|
||||
+++ libjava/configure.host (revision 126623)
|
||||
@@ -82,6 +82,10 @@ case "${host}" in
|
||||
enable_getenv_properties_default=no
|
||||
enable_main_args_default=no
|
||||
;;
|
||||
+ arm*-linux-gnu)
|
||||
+ libgcj_interpreter=yes
|
||||
+ sysdeps_dir=arm
|
||||
+ ;;
|
||||
mips-tx39-*|mipstx39-unknown-*)
|
||||
libgcj_flags="${libgcj_flags} -G 0"
|
||||
LDFLAGS="$LDFLAGS -Tjmr3904dram.ld"
|
||||
--- libjava/libgcj.ver (revision 126621)
|
||||
+++ libjava/libgcj.ver (revision 126623)
|
||||
@@ -2,6 +2,6 @@
|
||||
# symbols in libgcj.so.
|
||||
|
||||
{
|
||||
- global: Jv*; _Jv_*; __gcj_personality_v0; _Z*;
|
||||
+ global: Jv*; _Jv_*; __gcj_personality_v0; __gcj_personality_sj0; _Z*;
|
||||
local: *;
|
||||
};
|
||||
--- libjava/sysdep/arm/locks.h (revision 0)
|
||||
+++ libjava/sysdep/arm/locks.h (revision 126623)
|
||||
@@ -0,0 +1,79 @@
|
||||
+// locks.h - Thread synchronization primitives. ARM implementation.
|
||||
+
|
||||
+/* Copyright (C) 2007 Free Software Foundation
|
||||
+
|
||||
+ This file is part of libgcj.
|
||||
+
|
||||
+This software is copyrighted work licensed under the terms of the
|
||||
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
+details. */
|
||||
+
|
||||
+#ifndef __SYSDEP_LOCKS_H__
|
||||
+#define __SYSDEP_LOCKS_H__
|
||||
+
|
||||
+typedef size_t obj_addr_t; /* Integer type big enough for object */
|
||||
+ /* address. */
|
||||
+
|
||||
+/* Atomic compare and exchange. These sequences are not actually
|
||||
+ atomic; there is a race if *ADDR != OLD_VAL and we are preempted
|
||||
+ between the two swaps. However, they are very close to atomic, and
|
||||
+ are the best that a pre-ARMv6 implementation can do without
|
||||
+ operating system support. LinuxThreads has been using these
|
||||
+ sequences for many years. */
|
||||
+
|
||||
+inline static bool
|
||||
+compare_and_swap(volatile obj_addr_t *addr,
|
||||
+ obj_addr_t old_val,
|
||||
+ obj_addr_t new_val)
|
||||
+{
|
||||
+ volatile obj_addr_t result, tmp;
|
||||
+ __asm__ ("\n"
|
||||
+ "0: ldr %[tmp],[%[addr]]\n"
|
||||
+ " cmp %[tmp],%[old_val]\n"
|
||||
+ " movne %[result],#0\n"
|
||||
+ " bne 1f\n"
|
||||
+ " swp %[result],%[new_val],[%[addr]]\n"
|
||||
+ " cmp %[tmp],%[result]\n"
|
||||
+ " swpne %[tmp],%[result],[%[addr]]\n"
|
||||
+ " bne 0b\n"
|
||||
+ " mov %[result],#1\n"
|
||||
+ "1:"
|
||||
+ : [result] "=&r" (result), [tmp] "=&r" (tmp)
|
||||
+ : [addr] "r" (addr), [new_val] "r" (new_val), [old_val] "r" (old_val)
|
||||
+ : "cc", "memory");
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+inline static void
|
||||
+release_set(volatile obj_addr_t *addr, obj_addr_t new_val)
|
||||
+{
|
||||
+ __asm__ __volatile__("" : : : "memory");
|
||||
+ *(addr) = new_val;
|
||||
+}
|
||||
+
|
||||
+inline static bool
|
||||
+compare_and_swap_release(volatile obj_addr_t *addr,
|
||||
+ obj_addr_t old,
|
||||
+ obj_addr_t new_val)
|
||||
+{
|
||||
+ return compare_and_swap(addr, old, new_val);
|
||||
+}
|
||||
+
|
||||
+// Ensure that subsequent instructions do not execute on stale
|
||||
+// data that was loaded from memory before the barrier.
|
||||
+inline static void
|
||||
+read_barrier()
|
||||
+{
|
||||
+ __asm__ __volatile__("" : : : "memory");
|
||||
+}
|
||||
+
|
||||
+// Ensure that prior stores to memory are completed with respect to other
|
||||
+// processors.
|
||||
+inline static void
|
||||
+write_barrier()
|
||||
+{
|
||||
+ __asm__ __volatile__("" : : : "memory");
|
||||
+}
|
||||
+
|
||||
+#endif
|
33
gcc41-java-arm3.patch
Normal file
33
gcc41-java-arm3.patch
Normal file
@ -0,0 +1,33 @@
|
||||
2007-07-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* unwind-sjlj.c (_Unwind_GetIPInfo): Check for context->fc != NULL
|
||||
before looking in the context.
|
||||
|
||||
* configure.host:
|
||||
arm*-linux-gnu -> arm*-linux*.
|
||||
|
||||
--- gcc/unwind-sjlj.c (revision 126657)
|
||||
+++ gcc/unwind-sjlj.c (revision 126659)
|
||||
@@ -222,7 +222,10 @@ _Unwind_Ptr
|
||||
_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
|
||||
{
|
||||
*ip_before_insn = 0;
|
||||
- return context->fc->call_site + 1;
|
||||
+ if (context->fc != NULL)
|
||||
+ return context->fc->call_site + 1;
|
||||
+ else
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Set the return landing pad index in CONTEXT. */
|
||||
--- libjava/configure.host (revision 126657)
|
||||
+++ libjava/configure.host (revision 126659)
|
||||
@@ -82,7 +82,7 @@ case "${host}" in
|
||||
enable_getenv_properties_default=no
|
||||
enable_main_args_default=no
|
||||
;;
|
||||
- arm*-linux-gnu)
|
||||
+ arm*-linux*)
|
||||
libgcj_interpreter=yes
|
||||
sysdeps_dir=arm
|
||||
;;
|
138
gcc41-java-arm4.patch
Normal file
138
gcc41-java-arm4.patch
Normal file
@ -0,0 +1,138 @@
|
||||
2007-09-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
|
||||
when using the ARM EABI.
|
||||
|
||||
2007-08-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* config/arm/libgcc-bpabi.ver: Add _Unwind_Backtrace as GCC_4.3.0.
|
||||
|
||||
2007-08-08 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* config/arm/libunwind.S (UNWIND_WRAPPER _Unwind_Backtrace): New.
|
||||
* config/arm/unwind-arm.h (__gnu_Unwind_Backtrace): New.
|
||||
* config/arm/unwind-arm.c (__gnu_Unwind_Backtrace): New.
|
||||
|
||||
--- gcc/java/decl.c (revision 128085)
|
||||
+++ gcc/java/decl.c (revision 128088)
|
||||
@@ -1075,7 +1075,10 @@ java_init_decl_processing (void)
|
||||
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
|
||||
? "__gcj_personality_sj0"
|
||||
: "__gcj_personality_v0");
|
||||
- default_init_unwind_resume_libfunc ();
|
||||
+ if (targetm.arm_eabi_unwinder)
|
||||
+ unwind_resume_libfunc = init_one_libfunc ("__cxa_end_cleanup");
|
||||
+ else
|
||||
+ default_init_unwind_resume_libfunc ();
|
||||
|
||||
lang_eh_runtime_type = do_nothing;
|
||||
|
||||
--- gcc/config/arm/libunwind.S (revision 128085)
|
||||
+++ gcc/config/arm/libunwind.S (revision 128088)
|
||||
@@ -237,5 +237,6 @@ UNWIND_WRAPPER _Unwind_RaiseException 1
|
||||
UNWIND_WRAPPER _Unwind_Resume 1
|
||||
UNWIND_WRAPPER _Unwind_Resume_or_Rethrow 1
|
||||
UNWIND_WRAPPER _Unwind_ForcedUnwind 3
|
||||
+UNWIND_WRAPPER _Unwind_Backtrace 2
|
||||
|
||||
-#endif /* __symbian__ */
|
||||
+#endif /* ndef __symbian__ */
|
||||
--- gcc/config/arm/libgcc-bpabi.ver (revision 128085)
|
||||
+++ gcc/config/arm/libgcc-bpabi.ver (revision 128088)
|
||||
@@ -81,3 +81,11 @@ GCC_3.5 {
|
||||
# GNU-specific entry point.
|
||||
__gnu_unwind_frame
|
||||
}
|
||||
+
|
||||
+%exclude {
|
||||
+ _Unwind_Backtrace
|
||||
+}
|
||||
+%inherit GCC_4.3.0 GCC_4.2.0
|
||||
+GCC_4.3.0 {
|
||||
+ _Unwind_Backtrace
|
||||
+}
|
||||
--- gcc/config/arm/unwind-arm.c (revision 128085)
|
||||
+++ gcc/config/arm/unwind-arm.c (revision 128088)
|
||||
@@ -950,6 +950,66 @@ _Unwind_DeleteException (_Unwind_Excepti
|
||||
}
|
||||
|
||||
|
||||
+/* Perform stack backtrace through unwind data. */
|
||||
+_Unwind_Reason_Code
|
||||
+__gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument,
|
||||
+ phase2_vrs * entry_vrs);
|
||||
+_Unwind_Reason_Code
|
||||
+__gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument,
|
||||
+ phase2_vrs * entry_vrs)
|
||||
+{
|
||||
+ phase1_vrs saved_vrs;
|
||||
+ _Unwind_Reason_Code code;
|
||||
+
|
||||
+ _Unwind_Control_Block ucb;
|
||||
+ _Unwind_Control_Block *ucbp = &ucb;
|
||||
+
|
||||
+ /* Set the pc to the call site. */
|
||||
+ entry_vrs->core.r[R_PC] = entry_vrs->core.r[R_LR];
|
||||
+
|
||||
+ /* Save the core registers. */
|
||||
+ saved_vrs.core = entry_vrs->core;
|
||||
+ /* Set demand-save flags. */
|
||||
+ saved_vrs.demand_save_flags = ~(_uw) 0;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ /* Find the entry for this routine. */
|
||||
+ if (get_eit_entry (ucbp, saved_vrs.core.r[R_PC]) != _URC_OK)
|
||||
+ {
|
||||
+ code = _URC_FAILURE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* The dwarf unwinder assumes the context structure holds things
|
||||
+ like the function and LSDA pointers. The ARM implementation
|
||||
+ caches these in the exception header (UCB). To avoid
|
||||
+ rewriting everything we make the virtual IP register point at
|
||||
+ the UCB. */
|
||||
+ _Unwind_SetGR((_Unwind_Context *)&saved_vrs, 12, (_Unwind_Ptr) ucbp);
|
||||
+
|
||||
+ /* Call trace function. */
|
||||
+ if ((*trace) ((_Unwind_Context *) &saved_vrs, trace_argument)
|
||||
+ != _URC_NO_REASON)
|
||||
+ {
|
||||
+ code = _URC_FAILURE;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Call the pr to decide what to do. */
|
||||
+ code = ((personality_routine) UCB_PR_ADDR (ucbp))
|
||||
+ (_US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND,
|
||||
+ ucbp, (void *) &saved_vrs);
|
||||
+ }
|
||||
+ while (code != _URC_END_OF_STACK
|
||||
+ && code != _URC_FAILURE);
|
||||
+
|
||||
+ finish:
|
||||
+ restore_non_core_regs (&saved_vrs);
|
||||
+ return code;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Common implementation for ARM ABI defined personality routines.
|
||||
ID is the index of the personality routine, other arguments are as defined
|
||||
by __aeabi_unwind_cpp_pr{0,1,2}. */
|
||||
--- gcc/config/arm/unwind-arm.h (revision 128085)
|
||||
+++ gcc/config/arm/unwind-arm.h (revision 128088)
|
||||
@@ -205,6 +205,13 @@ extern "C" {
|
||||
_Unwind_Control_Block *, struct _Unwind_Context *, void *);
|
||||
_Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *,
|
||||
_Unwind_Stop_Fn, void *);
|
||||
+ /* @@@ Use unwind data to perform a stack backtrace. The trace callback
|
||||
+ is called for every stack frame in the call chain, but no cleanup
|
||||
+ actions are performed. */
|
||||
+ typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (_Unwind_Context *, void *);
|
||||
+ _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn,
|
||||
+ void*);
|
||||
+
|
||||
_Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
|
||||
void _Unwind_Complete(_Unwind_Control_Block *ucbp);
|
||||
void _Unwind_DeleteException (_Unwind_Exception *);
|
280
gcc41-java-arm5.patch
Normal file
280
gcc41-java-arm5.patch
Normal file
@ -0,0 +1,280 @@
|
||||
2007-09-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/arm/sysv.S (UNWIND): New.
|
||||
(Whole file): Conditionally compile unwinder directives.
|
||||
* src/arm/sysv.S: Add unwinder directives.
|
||||
|
||||
* src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes.
|
||||
Only treat r0 as a struct address if we're actually returning a
|
||||
struct by address.
|
||||
Only copy the bytes that are actually within a struct.
|
||||
(ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes
|
||||
is returned in r0, not passed by address.
|
||||
(ffi_call): Allocate a word-sized temporary for the case where
|
||||
a composite is returned in r0.
|
||||
(ffi_prep_incoming_args_SYSV): Align as necessary.
|
||||
|
||||
2007-08-05 Steven Newbury <s_j_newbury@yahoo.co.uk>
|
||||
|
||||
* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of
|
||||
directly using the sys_cacheflush syscall.
|
||||
|
||||
2007-07-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* src/arm/sysv.S (ffi_closure_SYSV): Add soft-float.
|
||||
|
||||
--- libffi/src/arm/ffi.c (revision 128092)
|
||||
+++ libffi/src/arm/ffi.c (revision 128093)
|
||||
@@ -40,7 +40,7 @@ void ffi_prep_args(char *stack, extended
|
||||
|
||||
argp = stack;
|
||||
|
||||
- if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
|
||||
+ if ( ecif->cif->flags == FFI_TYPE_STRUCT ) {
|
||||
*(void **) argp = ecif->rvalue;
|
||||
argp += 4;
|
||||
}
|
||||
@@ -58,6 +58,9 @@ void ffi_prep_args(char *stack, extended
|
||||
argp = (char *) ALIGN(argp, (*p_arg)->alignment);
|
||||
}
|
||||
|
||||
+ if ((*p_arg)->type == FFI_TYPE_STRUCT)
|
||||
+ argp = (char *) ALIGN(argp, 4);
|
||||
+
|
||||
z = (*p_arg)->size;
|
||||
if (z < sizeof(int))
|
||||
{
|
||||
@@ -81,7 +84,7 @@ void ffi_prep_args(char *stack, extended
|
||||
break;
|
||||
|
||||
case FFI_TYPE_STRUCT:
|
||||
- *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
|
||||
+ memcpy(argp, *p_argv, (*p_arg)->size);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -115,7 +118,6 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
|
||||
switch (cif->rtype->type)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
- case FFI_TYPE_STRUCT:
|
||||
case FFI_TYPE_FLOAT:
|
||||
case FFI_TYPE_DOUBLE:
|
||||
cif->flags = (unsigned) cif->rtype->type;
|
||||
@@ -126,6 +128,17 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
|
||||
cif->flags = (unsigned) FFI_TYPE_SINT64;
|
||||
break;
|
||||
|
||||
+ case FFI_TYPE_STRUCT:
|
||||
+ if (cif->rtype->size <= 4)
|
||||
+ /* A Composite Type not larger than 4 bytes is returned in r0. */
|
||||
+ cif->flags = (unsigned)FFI_TYPE_INT;
|
||||
+ else
|
||||
+ /* A Composite Type larger than 4 bytes, or whose size cannot
|
||||
+ be determined statically ... is stored in memory at an
|
||||
+ address passed [in r0]. */
|
||||
+ cif->flags = (unsigned)FFI_TYPE_STRUCT;
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
cif->flags = FFI_TYPE_INT;
|
||||
break;
|
||||
@@ -141,21 +154,27 @@ void ffi_call(ffi_cif *cif, void (*fn)()
|
||||
{
|
||||
extended_cif ecif;
|
||||
|
||||
+ int small_struct = (cif->flags == FFI_TYPE_INT
|
||||
+ && cif->rtype->type == FFI_TYPE_STRUCT);
|
||||
+
|
||||
ecif.cif = cif;
|
||||
ecif.avalue = avalue;
|
||||
+
|
||||
+ unsigned int temp;
|
||||
|
||||
/* If the return value is a struct and we don't have a return */
|
||||
/* value address then we need to make one */
|
||||
|
||||
if ((rvalue == NULL) &&
|
||||
- (cif->rtype->type == FFI_TYPE_STRUCT))
|
||||
+ (cif->flags == FFI_TYPE_STRUCT))
|
||||
{
|
||||
ecif.rvalue = alloca(cif->rtype->size);
|
||||
}
|
||||
+ else if (small_struct)
|
||||
+ ecif.rvalue = &temp;
|
||||
else
|
||||
ecif.rvalue = rvalue;
|
||||
-
|
||||
-
|
||||
+
|
||||
switch (cif->abi)
|
||||
{
|
||||
case FFI_SYSV:
|
||||
@@ -167,6 +186,8 @@ void ffi_call(ffi_cif *cif, void (*fn)()
|
||||
FFI_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
+ if (small_struct)
|
||||
+ memcpy (rvalue, &temp, cif->rtype->size);
|
||||
}
|
||||
|
||||
/** private members **/
|
||||
@@ -228,9 +249,12 @@ ffi_prep_incoming_args_SYSV(char *stack,
|
||||
{
|
||||
size_t z;
|
||||
|
||||
+ size_t alignment = (*p_arg)->alignment;
|
||||
+ if (alignment < 4)
|
||||
+ alignment = 4;
|
||||
/* Align if necessary */
|
||||
- if ((sizeof(int) - 1) & (unsigned) argp) {
|
||||
- argp = (char *) ALIGN(argp, sizeof(int));
|
||||
+ if ((alignment - 1) & (unsigned) argp) {
|
||||
+ argp = (char *) ALIGN(argp, alignment);
|
||||
}
|
||||
|
||||
z = (*p_arg)->size;
|
||||
@@ -248,21 +272,16 @@ ffi_prep_incoming_args_SYSV(char *stack,
|
||||
|
||||
/* How to make a trampoline. */
|
||||
|
||||
-#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
-({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
- unsigned int __fun = (unsigned int)(FUN); \
|
||||
- unsigned int __ctx = (unsigned int)(CTX); \
|
||||
+#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
+({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
+ unsigned int __fun = (unsigned int)(FUN); \
|
||||
+ unsigned int __ctx = (unsigned int)(CTX); \
|
||||
*(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \
|
||||
- *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
|
||||
- *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
|
||||
- *(unsigned int*) &__tramp[12] = __ctx; \
|
||||
- *(unsigned int*) &__tramp[16] = __fun; \
|
||||
- register unsigned long _beg __asm ("a1") = (unsigned long) (&__tramp[0]); \
|
||||
- register unsigned long _end __asm ("a2") = (unsigned long) (&__tramp[19]); \
|
||||
- register unsigned long _flg __asm ("a3") = 0; \
|
||||
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
|
||||
- : "=r" (_beg) \
|
||||
- : "0" (_beg), "r" (_end), "r" (_flg)); \
|
||||
+ *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \
|
||||
+ *(unsigned int*) &__tramp[12] = __ctx; \
|
||||
+ *(unsigned int*) &__tramp[16] = __fun; \
|
||||
+ __clear_cache((&__tramp[0]), (&__tramp[19])); \
|
||||
})
|
||||
|
||||
|
||||
--- libffi/src/arm/sysv.S (revision 128092)
|
||||
+++ libffi/src/arm/sysv.S (revision 128093)
|
||||
@@ -82,6 +82,14 @@
|
||||
# define call_reg(x) mov lr, pc ; mov pc, x
|
||||
#endif
|
||||
|
||||
+/* Conditionally compile unwinder directives. */
|
||||
+#ifdef __ARM_EABI__
|
||||
+#define UNWIND
|
||||
+#else
|
||||
+#define UNWIND @
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
|
||||
.macro ARM_FUNC_START name
|
||||
.text
|
||||
@@ -92,6 +100,7 @@
|
||||
bx pc
|
||||
nop
|
||||
.arm
|
||||
+ UNWIND .fnstart
|
||||
/* A hook to tell gdb that we've switched to ARM mode. Also used to call
|
||||
directly from other local arm routines. */
|
||||
_L__\name:
|
||||
@@ -102,6 +111,7 @@ _L__\name:
|
||||
.align 0
|
||||
.arm
|
||||
ENTRY(\name)
|
||||
+ UNWIND .fnstart
|
||||
.endm
|
||||
#endif
|
||||
|
||||
@@ -134,8 +144,11 @@ _L__\name:
|
||||
ARM_FUNC_START ffi_call_SYSV
|
||||
@ Save registers
|
||||
stmfd sp!, {r0-r3, fp, lr}
|
||||
+ UNWIND .save {r0-r3, fp, lr}
|
||||
mov fp, sp
|
||||
|
||||
+ UNWIND .setfp fp, sp
|
||||
+
|
||||
@ Make room for all of the new args.
|
||||
sub sp, fp, r2
|
||||
|
||||
@@ -205,6 +218,7 @@ LSYM(Lepilogue):
|
||||
RETLDM "r0-r3,fp"
|
||||
|
||||
.ffi_call_SYSV_end:
|
||||
+ UNWIND .fnend
|
||||
.size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
|
||||
|
||||
/*
|
||||
@@ -216,21 +230,40 @@ LSYM(Lepilogue):
|
||||
*/
|
||||
|
||||
ARM_FUNC_START ffi_closure_SYSV
|
||||
+ UNWIND .pad #16
|
||||
add ip, sp, #16
|
||||
stmfd sp!, {ip, lr}
|
||||
+ UNWIND .save {r0, lr}
|
||||
add r2, sp, #8
|
||||
+ .pad #16
|
||||
sub sp, sp, #16
|
||||
str sp, [sp, #8]
|
||||
add r1, sp, #8
|
||||
bl ffi_closure_SYSV_inner
|
||||
cmp r0, #FFI_TYPE_INT
|
||||
beq .Lretint
|
||||
+
|
||||
cmp r0, #FFI_TYPE_FLOAT
|
||||
+#ifdef __SOFTFP__
|
||||
+ beq .Lretint
|
||||
+#else
|
||||
beq .Lretfloat
|
||||
+#endif
|
||||
+
|
||||
cmp r0, #FFI_TYPE_DOUBLE
|
||||
+#ifdef __SOFTFP__
|
||||
+ beq .Lretlonglong
|
||||
+#else
|
||||
beq .Lretdouble
|
||||
+#endif
|
||||
+
|
||||
cmp r0, #FFI_TYPE_LONGDOUBLE
|
||||
+#ifdef __SOFTFP__
|
||||
+ beq .Lretlonglong
|
||||
+#else
|
||||
beq .Lretlongdouble
|
||||
+#endif
|
||||
+
|
||||
cmp r0, #FFI_TYPE_SINT64
|
||||
beq .Lretlonglong
|
||||
.Lclosure_epilogue:
|
||||
@@ -243,6 +276,8 @@ ARM_FUNC_START ffi_closure_SYSV
|
||||
ldr r0, [sp]
|
||||
ldr r1, [sp, #4]
|
||||
b .Lclosure_epilogue
|
||||
+
|
||||
+#ifndef __SOFTFP__
|
||||
.Lretfloat:
|
||||
ldfs f0, [sp]
|
||||
b .Lclosure_epilogue
|
||||
@@ -252,6 +287,9 @@ ARM_FUNC_START ffi_closure_SYSV
|
||||
.Lretlongdouble:
|
||||
ldfd f0, [sp]
|
||||
b .Lclosure_epilogue
|
||||
+#endif
|
||||
+
|
||||
.ffi_closure_SYSV_end:
|
||||
+ UNWIND .fnend
|
||||
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
|
932
gcc41-java-arm6.patch
Normal file
932
gcc41-java-arm6.patch
Normal file
@ -0,0 +1,932 @@
|
||||
2007-09-04 Andrew Haley <aph@redhat.com>
|
||||
|
||||
PR java/27908
|
||||
* testsuite/libjava.lang/PR27908.java
|
||||
({run1,run2,run3}.isRunning): New Method.
|
||||
(main): Fix race condition.
|
||||
|
||||
2007-08-29 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/classpath/natVMStackWalker.cc (VMStackWalker::getCallingClass):
|
||||
Make sure we're not sibcalled.
|
||||
(GET_CALLING_CLASS): Define for ARM EABI.
|
||||
|
||||
2007-08-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.host (BACKTRACESPEC): Add arm*-linux*.
|
||||
|
||||
2007-08-22 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.ac (LIBSTDCXXSPEC): New.
|
||||
* configure.host: Add arm*-linux* to pthread test.
|
||||
* configure.ac (LIBGCJTESTSPEC): Add path to libstdc++ for ARM
|
||||
EABI.
|
||||
* testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Use
|
||||
-fexceptions for ARM EABI.
|
||||
* testsuite/lib/libjava.exp (libjava_arguments): Add libgcj-test.spec.
|
||||
(libjava_invoke): Log the invocation.
|
||||
|
||||
2007-08-15 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.ac (extra_ldflags): Define.
|
||||
* Makefile.am: Use extra_ldflags for all executables.
|
||||
|
||||
2007-08-14 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* sysdep/arm/backtrace.h: Remove stubs for _Unwind_GetIPInfo,
|
||||
_Unwind_GetRegionStart, and _Unwind_Backtrace.
|
||||
|
||||
2007-07-27 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* gnu/classpath/natVMStackWalker.cc (GET_CALLING_CLASS): Stub for
|
||||
ARM EABI.
|
||||
* exception.cc (get_exception_header_from_ue): New.
|
||||
(get_ttype_entry): ARM EABI version.
|
||||
(PERSONALITY_FUNCTION): Add ARM EABI code.
|
||||
* sysdep/arm/backtrace.h: New file.
|
||||
* stacktrace.cc (_URC_NORMAL_STOP): New.
|
||||
* configure.ac (extra_ldflags_libjava): Add libsupc++.la for ARM
|
||||
EABI.
|
||||
* configure.host (BACKTRACESPEC): Add arm/backtrace.h.
|
||||
|
||||
--- libjava/testsuite/Makefile.in.jj 2007-09-06 14:06:13.000000000 +0200
|
||||
+++ libjava/testsuite/Makefile.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -160,6 +160,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -264,6 +265,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
--- libjava/testsuite/libjava.jni/jni.exp.jj 2007-09-06 14:06:13.000000000 +0200
|
||||
+++ libjava/testsuite/libjava.jni/jni.exp 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -29,6 +29,10 @@ proc gcj_jni_compile_c_to_so {file {opti
|
||||
set name [file rootname $filename]
|
||||
set soname lib${name}.${so_extension}
|
||||
|
||||
+ if { [istarget "*arm-*eabi*"] } {
|
||||
+ lappend options "additional_flags=-fexceptions"
|
||||
+ }
|
||||
+
|
||||
lappend options "additional_flags=${so_flag} -fPIC"
|
||||
# Find the generated header.
|
||||
lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
--- libjava/testsuite/lib/libjava.exp.jj 2007-09-06 14:06:13.000000000 +0200
|
||||
+++ libjava/testsuite/lib/libjava.exp 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -379,6 +379,7 @@ proc libjava_arguments {{mode compile}}
|
||||
if {$mode == "link"} {
|
||||
global wrapper_file wrap_compile_flags
|
||||
lappend args "additional_flags=$wrap_compile_flags"
|
||||
+ lappend args "additional_flags=-specs=libgcj-test.spec"
|
||||
lappend args "libs=$wrapper_file"
|
||||
lappend args "libs=$libjava"
|
||||
lappend args debug
|
||||
--- libjava/configure.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/configure 2007-09-06 17:27:04.000000000 +0200
|
||||
@@ -310,7 +310,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_subdir host_subdir target_subdir libgcj_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV LIBMAGIC PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
|
||||
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_subdir host_subdir target_subdir libgcj_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava extra_ldflags LIBSTDCXXSPEC LIBGCJTESTSPEC GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV LIBMAGIC PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@@ -7640,9 +7640,6 @@ case "${host}" in
|
||||
esac
|
||||
|
||||
|
||||
-LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
-
|
||||
-
|
||||
|
||||
# Check whether --with-system-zlib or --without-system-zlib was given.
|
||||
if test "${with_system_zlib+set}" = set; then
|
||||
@@ -9126,6 +9123,9 @@ fi
|
||||
# FIXME: this should be _libs on some hosts.
|
||||
libsubdir=.libs
|
||||
|
||||
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
+
|
||||
+LIBSTDCXXSPEC=
|
||||
# extra LD Flags which are required for targets
|
||||
case "${host}" in
|
||||
*-*-darwin[0-7].*)
|
||||
@@ -9134,9 +9134,21 @@ case "${host}" in
|
||||
# on Darwin -single_module speeds up loading of the dynamic libraries.
|
||||
extra_ldflags_libjava=-Wl,-single_module
|
||||
;;
|
||||
+arm*linux*eabi)
|
||||
+ # Some of the ARM unwinder code is actually in libstdc++. We
|
||||
+ # could in principle replicate it in libgcj, but it's better to
|
||||
+ # have a dependency on libstdc++.
|
||||
+ extra_ldflags='-L$(here)/../libstdc++-v3/src -lstdc++'
|
||||
+ LIBSTDCXXSPEC=-lstdc++
|
||||
+ LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
# Allow the GC to be disabled. Can be useful when debugging.
|
||||
echo "$as_me:$LINENO: checking for garbage collector to use" >&5
|
||||
echo $ECHO_N "checking for garbage collector to use... $ECHO_C" >&6
|
||||
@@ -18024,7 +18036,6 @@ s,@USING_POSIX_PLATFORM_FALSE@,$USING_PO
|
||||
s,@USING_DARWIN_CRT_TRUE@,$USING_DARWIN_CRT_TRUE,;t t
|
||||
s,@USING_DARWIN_CRT_FALSE@,$USING_DARWIN_CRT_FALSE,;t t
|
||||
s,@SYSTEMSPEC@,$SYSTEMSPEC,;t t
|
||||
-s,@LIBGCJTESTSPEC@,$LIBGCJTESTSPEC,;t t
|
||||
s,@ZLIBSPEC@,$ZLIBSPEC,;t t
|
||||
s,@ZLIBTESTSPEC@,$ZLIBTESTSPEC,;t t
|
||||
s,@X_CFLAGS@,$X_CFLAGS,;t t
|
||||
@@ -18032,6 +18043,9 @@ s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
|
||||
s,@X_LIBS@,$X_LIBS,;t t
|
||||
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
|
||||
s,@extra_ldflags_libjava@,$extra_ldflags_libjava,;t t
|
||||
+s,@extra_ldflags@,$extra_ldflags,;t t
|
||||
+s,@LIBSTDCXXSPEC@,$LIBSTDCXXSPEC,;t t
|
||||
+s,@LIBGCJTESTSPEC@,$LIBGCJTESTSPEC,;t t
|
||||
s,@GCLIBS@,$GCLIBS,;t t
|
||||
s,@GCINCS@,$GCINCS,;t t
|
||||
s,@GCDEPS@,$GCDEPS,;t t
|
||||
--- libjava/Makefile.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/Makefile.in 2007-09-06 17:28:51.000000000 +0200
|
||||
@@ -627,6 +627,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -731,6 +732,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@ $(am__append_5)
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
@@ -812,7 +814,7 @@ GCJLINK = $(LIBTOOL) --tag=GCJ --mode=li
|
||||
|
||||
GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
|
||||
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
|
||||
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
|
||||
+ $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
|
||||
|
||||
WARNINGS = -Wextra -Wall
|
||||
AM_CXXFLAGS = \
|
||||
@@ -872,7 +874,7 @@ xlib_nat_files = $(xlib_nat_source_files
|
||||
|
||||
# Include THREADLIBS here to ensure that the correct version of
|
||||
# certain linuxthread functions get linked:
|
||||
-libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
|
||||
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
|
||||
$(LIBLTDL) $(SYS_ZLIBS) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
|
||||
@@ -7784,7 +7786,7 @@ NM = nm
|
||||
|
||||
jv_convert_SOURCES =
|
||||
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
jv_convert_LINK = $(GCJLINK)
|
||||
jv_convert_LDADD = -L$(here)/.libs libgcj.la
|
||||
@@ -7800,7 +7802,7 @@ gcj_dbtool_LDADD = gnu/gcj/tools/gcj_dbt
|
||||
gcj_dbtool_DEPENDENCIES = gnu/gcj/tools/gcj_dbtool.lo libgcj.la libgcj.spec
|
||||
gij_SOURCES =
|
||||
gij_LDFLAGS = -rpath $(libdir)/gcj-$(gcc_version) -rpath $(toolexeclibdir) \
|
||||
- -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gij_LINK = $(GCJLINK)
|
||||
gij_LDADD = -L$(here)/.libs libgij.la
|
||||
@@ -7820,91 +7822,91 @@ ECJX_BASE_FLAGS = -findirect-dispatch \
|
||||
@NATIVE_TRUE@ecjx_DEPENDENCIES = libgcj.la libgcj.spec
|
||||
gappletviewer_SOURCES =
|
||||
gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gappletviewer_LINK = $(GCJLINK)
|
||||
gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gappletviewer_DEPENDENCIES = libgcj-tools.la
|
||||
gjarsigner_SOURCES =
|
||||
gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gjarsigner_LINK = $(GCJLINK)
|
||||
gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjarsigner_DEPENDENCIES = libgcj-tools.la
|
||||
gkeytool_SOURCES =
|
||||
gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gkeytool_LINK = $(GCJLINK)
|
||||
gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gkeytool_DEPENDENCIES = libgcj-tools.la
|
||||
gjar_SOURCES =
|
||||
gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gjar_LINK = $(GCJLINK)
|
||||
gjar_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjar_DEPENDENCIES = libgcj-tools.la
|
||||
gjavah_SOURCES =
|
||||
gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gjavah_LINK = $(GCJLINK)
|
||||
gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gjavah_DEPENDENCIES = libgcj-tools.la
|
||||
gcjh_SOURCES =
|
||||
gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gcjh_LINK = $(GCJLINK)
|
||||
gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gcjh_DEPENDENCIES = libgcj-tools.la
|
||||
gnative2ascii_SOURCES =
|
||||
gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gnative2ascii_LINK = $(GCJLINK)
|
||||
gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gnative2ascii_DEPENDENCIES = libgcj-tools.la
|
||||
gorbd_SOURCES =
|
||||
gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gorbd_LINK = $(GCJLINK)
|
||||
gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gorbd_DEPENDENCIES = libgcj-tools.la
|
||||
grmid_SOURCES =
|
||||
grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
grmid_LINK = $(GCJLINK)
|
||||
grmid_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmid_DEPENDENCIES = libgcj-tools.la
|
||||
gserialver_SOURCES =
|
||||
gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gserialver_LINK = $(GCJLINK)
|
||||
gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gserialver_DEPENDENCIES = libgcj-tools.la
|
||||
gtnameserv_SOURCES =
|
||||
gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
gtnameserv_LINK = $(GCJLINK)
|
||||
gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
gtnameserv_DEPENDENCIES = libgcj-tools.la
|
||||
grmic_SOURCES =
|
||||
grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
grmic_LINK = $(GCJLINK)
|
||||
grmic_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
grmic_DEPENDENCIES = libgcj-tools.la
|
||||
grmiregistry_SOURCES =
|
||||
grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
|
||||
grmiregistry_LINK = $(GCJLINK)
|
||||
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
--- libjava/gcj/Makefile.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/gcj/Makefile.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -172,6 +172,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -276,6 +277,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
--- libjava/include/Makefile.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/include/Makefile.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -171,6 +171,7 @@ LIBLTDL = @LIBLTDL@
|
||||
LIBMAGIC = @LIBMAGIC@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
+LIBSTDCXXSPEC = @LIBSTDCXXSPEC@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
@@ -275,6 +276,7 @@ build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
dbexecdir = @dbexecdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
gxx_include_dir = @gxx_include_dir@
|
||||
here = @here@
|
||||
--- libjava/configure.ac.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/configure.ac 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -777,9 +777,6 @@ case "${host}" in
|
||||
esac
|
||||
AC_SUBST(SYSTEMSPEC)
|
||||
|
||||
-LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
-AC_SUBST(LIBGCJTESTSPEC)
|
||||
-
|
||||
AC_ARG_WITH(system-zlib,
|
||||
AS_HELP_STRING([--with-system-zlib],
|
||||
[use installed libz]))
|
||||
@@ -793,6 +790,9 @@ AC_PATH_XTRA
|
||||
# FIXME: this should be _libs on some hosts.
|
||||
libsubdir=.libs
|
||||
|
||||
+LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
|
||||
+
|
||||
+LIBSTDCXXSPEC=
|
||||
# extra LD Flags which are required for targets
|
||||
case "${host}" in
|
||||
*-*-darwin[[0-7]].*)
|
||||
@@ -801,8 +801,20 @@ case "${host}" in
|
||||
# on Darwin -single_module speeds up loading of the dynamic libraries.
|
||||
extra_ldflags_libjava=-Wl,-single_module
|
||||
;;
|
||||
+arm*linux*eabi)
|
||||
+ # Some of the ARM unwinder code is actually in libstdc++. We
|
||||
+ # could in principle replicate it in libgcj, but it's better to
|
||||
+ # have a dependency on libstdc++.
|
||||
+ extra_ldflags='-L$(here)/../libstdc++-v3/src -lstdc++'
|
||||
+ LIBSTDCXXSPEC=-lstdc++
|
||||
+ LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -L`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -rpath `${PWDCMD-pwd}`/.libs:`${PWDCMD-pwd}`/../libstdc++-v3/src/.libs -lstdc++"
|
||||
+ ;;
|
||||
esac
|
||||
AC_SUBST(extra_ldflags_libjava)
|
||||
+AC_SUBST(extra_ldflags)
|
||||
+AC_SUBST(LIBSTDCXXSPEC)
|
||||
+
|
||||
+AC_SUBST(LIBGCJTESTSPEC)
|
||||
|
||||
# Allow the GC to be disabled. Can be useful when debugging.
|
||||
AC_MSG_CHECKING([for garbage collector to use])
|
||||
--- libjava/libgcj.spec.in.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/libgcj.spec.in 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -7,6 +7,6 @@
|
||||
*startfile: @THREADSTARTFILESPEC@ %(startfileorig)
|
||||
|
||||
%rename lib liborig
|
||||
-*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) %(liborig)
|
||||
+*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig)
|
||||
|
||||
*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ -fkeep-inline-functions
|
||||
--- libjava/stacktrace.cc.jj 2007-09-06 14:06:16.000000000 +0200
|
||||
+++ libjava/stacktrace.cc 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -39,6 +39,10 @@ using namespace java::lang::reflect;
|
||||
using namespace java::util;
|
||||
using namespace gnu::gcj::runtime;
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+#define _URC_NORMAL_STOP _URC_FAILURE
|
||||
+#endif
|
||||
+
|
||||
// Maps ncode values to their containing native class.
|
||||
// NOTE: Currently this Map contradicts class GC for native classes. This map
|
||||
// (and the "new class stack") will need to use WeakReferences in order to
|
||||
--- libjava/configure.host.jj 2007-09-06 17:11:05.000000000 +0200
|
||||
+++ libjava/configure.host 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -85,6 +85,7 @@ case "${host}" in
|
||||
arm*-linux*)
|
||||
libgcj_interpreter=yes
|
||||
sysdeps_dir=arm
|
||||
+ fallback_backtrace_h=sysdep/arm/backtrace.h
|
||||
;;
|
||||
mips-tx39-*|mipstx39-unknown-*)
|
||||
libgcj_flags="${libgcj_flags} -G 0"
|
||||
@@ -258,6 +259,12 @@ EOF
|
||||
sysdeps_dir=x86-64
|
||||
DIVIDESPEC=-f%{m32:no-}%{!m32:%{!m64:no-}}%{m64:}use-divide-subroutine
|
||||
;;
|
||||
+ arm*-linux* )
|
||||
+ slow_pthread_self=no
|
||||
+ can_unwind_signal=no
|
||||
+ CHECKREFSPEC=-fcheck-references
|
||||
+ DIVIDESPEC=-fuse-divide-subroutine
|
||||
+ ;;
|
||||
mips*-*-linux* )
|
||||
sysdeps_dir=mips
|
||||
can_unwind_signal=yes
|
||||
--- libjava/Makefile.am.jj 2007-09-06 14:06:16.000000000 +0200
|
||||
+++ libjava/Makefile.am 2007-09-06 17:28:27.000000000 +0200
|
||||
@@ -100,6 +100,7 @@ endif
|
||||
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
|
||||
|
||||
extra_ldflags_libjava = @extra_ldflags_libjava@
|
||||
+extra_ldflags = @extra_ldflags@
|
||||
|
||||
if ANONVERSCRIPT
|
||||
extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver
|
||||
@@ -110,7 +111,7 @@ GCJLINK = $(LIBTOOL) --tag=GCJ --mode=li
|
||||
GCJ_FOR_ECJX = @GCJ_FOR_ECJX@
|
||||
GCJ_FOR_ECJX_LINK = $(GCJ_FOR_ECJX) -o $@
|
||||
LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
|
||||
- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
|
||||
+ $(LDFLAGS) $(extra_ldflags_libjava) $(extra_ldflags) -o $@
|
||||
|
||||
GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
|
||||
|
||||
@@ -232,7 +233,7 @@ xlib_nat_files = $(xlib_nat_source_files
|
||||
# Include THREADLIBS here to ensure that the correct version of
|
||||
# certain linuxthread functions get linked:
|
||||
## The mysterious backslash in the grep pattern is consumed by make.
|
||||
-libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
|
||||
+libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \
|
||||
$(LIBLTDL) $(SYS_ZLIBS) \
|
||||
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
|
||||
libgcj_la_LIBADD = \
|
||||
@@ -614,7 +615,7 @@ jv_convert_SOURCES =
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
jv_convert_LINK = $(GCJLINK)
|
||||
## We don't explicitly link in the libraries we need; libgcj.la brings
|
||||
## in all dependencies. We need the -L so that gcj can find libgcj
|
||||
@@ -635,7 +636,7 @@ gnu/gcj/tools/gcj_dbtool/natMain.cc
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gcj_dbtool_LINK = $(GCJLINK)
|
||||
## We don't explicitly link in the libraries we need; libgcj.la brings
|
||||
## in all dependencies. We need the -L so that gcj can find libgcj
|
||||
@@ -654,7 +655,7 @@ gij_SOURCES =
|
||||
## need this because we are explicitly using libtool to link using the
|
||||
## `.la' file.
|
||||
gij_LDFLAGS = -rpath $(libdir)/gcj-$(gcc_version) -rpath $(toolexeclibdir) \
|
||||
- -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gij_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gij_LDADD = -L$(here)/.libs libgij.la
|
||||
@@ -698,7 +699,7 @@ endif !NATIVE
|
||||
## This is a dummy definition.
|
||||
gappletviewer_SOURCES =
|
||||
gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gappletviewer_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gappletviewer_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -707,7 +708,7 @@ gappletviewer_DEPENDENCIES = libgcj-tool
|
||||
## This is a dummy definition.
|
||||
gjarsigner_SOURCES =
|
||||
gjarsigner_LDFLAGS = --main=gnu.classpath.tools.jarsigner.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gjarsigner_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjarsigner_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -716,7 +717,7 @@ gjarsigner_DEPENDENCIES = libgcj-tools.l
|
||||
## This is a dummy definition.
|
||||
gkeytool_SOURCES =
|
||||
gkeytool_LDFLAGS = --main=gnu.classpath.tools.keytool.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gkeytool_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gkeytool_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -725,7 +726,7 @@ gkeytool_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gjar_SOURCES =
|
||||
gjar_LDFLAGS = --main=gnu.classpath.tools.jar.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gjar_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjar_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -734,7 +735,7 @@ gjar_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gjavah_SOURCES =
|
||||
gjavah_LDFLAGS = --main=gnu.classpath.tools.javah.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gjavah_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gjavah_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -743,7 +744,7 @@ gjavah_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gcjh_SOURCES =
|
||||
gcjh_LDFLAGS = --main=gnu.classpath.tools.javah.GcjhMain \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gcjh_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gcjh_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -752,7 +753,7 @@ gcjh_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gnative2ascii_SOURCES =
|
||||
gnative2ascii_LDFLAGS = --main=gnu.classpath.tools.native2ascii.Native2ASCII \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gnative2ascii_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gnative2ascii_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -761,7 +762,7 @@ gnative2ascii_DEPENDENCIES = libgcj-tool
|
||||
## This is a dummy definition.
|
||||
gorbd_SOURCES =
|
||||
gorbd_LDFLAGS = --main=gnu.classpath.tools.orbd.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gorbd_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gorbd_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -770,7 +771,7 @@ gorbd_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
grmid_SOURCES =
|
||||
grmid_LDFLAGS = --main=gnu.classpath.tools.rmid.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
grmid_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmid_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -779,7 +780,7 @@ grmid_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
gserialver_SOURCES =
|
||||
gserialver_LDFLAGS = --main=gnu.classpath.tools.serialver.SerialVer \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gserialver_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gserialver_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -788,7 +789,7 @@ gserialver_DEPENDENCIES = libgcj-tools.l
|
||||
## This is a dummy definition.
|
||||
gtnameserv_SOURCES =
|
||||
gtnameserv_LDFLAGS = --main=gnu.classpath.tools.tnameserv.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
gtnameserv_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
gtnameserv_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -797,7 +798,7 @@ gtnameserv_DEPENDENCIES = libgcj-tools.l
|
||||
## This is a dummy definition.
|
||||
grmic_SOURCES =
|
||||
grmic_LDFLAGS = --main=gnu.classpath.tools.rmic.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
grmic_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmic_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
@@ -806,7 +807,7 @@ grmic_DEPENDENCIES = libgcj-tools.la
|
||||
## This is a dummy definition.
|
||||
grmiregistry_SOURCES =
|
||||
grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \
|
||||
- -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
|
||||
+ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags)
|
||||
grmiregistry_LINK = $(GCJLINK)
|
||||
## See jv_convert_LDADD.
|
||||
grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la
|
||||
--- libjava/exception.cc.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/exception.cc 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -58,6 +58,21 @@ struct java_exception_header
|
||||
_Unwind_Exception unwindHeader;
|
||||
};
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+// This is the exception class we report -- "GNUCJAVA".
|
||||
+
|
||||
+const _Unwind_Exception_Class __gcj_exception_class
|
||||
+ = {'G', 'N', 'U', 'C', 'J', 'A', 'V', 'A'};
|
||||
+
|
||||
+static inline java_exception_header *
|
||||
+get_exception_header_from_ue (_Unwind_Exception *exc)
|
||||
+{
|
||||
+ return reinterpret_cast<java_exception_header *>(exc + 1) - 1;
|
||||
+}
|
||||
+
|
||||
+extern "C" void __cxa_begin_cleanup (_Unwind_Exception*);
|
||||
+
|
||||
+#else // !__ARM_EABI_UNWINDER__
|
||||
// This is the exception class we report -- "GNUCJAVA".
|
||||
const _Unwind_Exception_Class __gcj_exception_class
|
||||
= ((((((((_Unwind_Exception_Class) 'G'
|
||||
@@ -75,6 +90,7 @@ get_exception_header_from_ue (_Unwind_Ex
|
||||
{
|
||||
return reinterpret_cast<java_exception_header *>(exc + 1) - 1;
|
||||
}
|
||||
+#endif // !__ARM_EABI_UNWINDER__
|
||||
|
||||
/* Perform a throw, Java style. Throw will unwind through this call,
|
||||
so there better not be any handlers or exception thrown here. */
|
||||
@@ -89,7 +105,8 @@ _Jv_Throw (jthrowable value)
|
||||
value = new java::lang::NullPointerException ();
|
||||
xh->value = value;
|
||||
|
||||
- xh->unwindHeader.exception_class = __gcj_exception_class;
|
||||
+ memcpy (&xh->unwindHeader.exception_class, &__gcj_exception_class,
|
||||
+ sizeof xh->unwindHeader.exception_class);
|
||||
xh->unwindHeader.exception_cleanup = NULL;
|
||||
|
||||
/* We're happy with setjmp/longjmp exceptions or region-based
|
||||
@@ -159,6 +176,21 @@ parse_lsda_header (_Unwind_Context *cont
|
||||
return p;
|
||||
}
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+
|
||||
+static void **
|
||||
+get_ttype_entry(_Unwind_Context *, lsda_header_info* info, _Unwind_Word i)
|
||||
+{
|
||||
+ _Unwind_Ptr ptr;
|
||||
+
|
||||
+ ptr = (_Unwind_Ptr) (info->TType - (i * 4));
|
||||
+ ptr = _Unwind_decode_target2(ptr);
|
||||
+
|
||||
+ return reinterpret_cast<void **>(ptr);
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+
|
||||
static void **
|
||||
get_ttype_entry (_Unwind_Context *context, lsda_header_info *info, long i)
|
||||
{
|
||||
@@ -170,6 +202,7 @@ get_ttype_entry (_Unwind_Context *contex
|
||||
return reinterpret_cast<void **>(ptr);
|
||||
}
|
||||
|
||||
+#endif
|
||||
|
||||
// Using a different personality function name causes link failures
|
||||
// when trying to mix code using different exception handling models.
|
||||
@@ -180,12 +213,33 @@ get_ttype_entry (_Unwind_Context *contex
|
||||
#define PERSONALITY_FUNCTION __gcj_personality_v0
|
||||
#endif
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+
|
||||
+#define CONTINUE_UNWINDING \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (__gnu_unwind_frame(ue_header, context) != _URC_OK) \
|
||||
+ return _URC_FAILURE; \
|
||||
+ return _URC_CONTINUE_UNWIND; \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
+extern "C" _Unwind_Reason_Code
|
||||
+PERSONALITY_FUNCTION (_Unwind_State state,
|
||||
+ struct _Unwind_Exception* ue_header,
|
||||
+ struct _Unwind_Context* context)
|
||||
+#else
|
||||
+
|
||||
+#define CONTINUE_UNWINDING return _URC_CONTINUE_UNWIND
|
||||
+
|
||||
extern "C" _Unwind_Reason_Code
|
||||
PERSONALITY_FUNCTION (int version,
|
||||
_Unwind_Action actions,
|
||||
_Unwind_Exception_Class exception_class,
|
||||
struct _Unwind_Exception *ue_header,
|
||||
struct _Unwind_Context *context)
|
||||
+
|
||||
+#endif
|
||||
{
|
||||
java_exception_header *xh = get_exception_header_from_ue (ue_header);
|
||||
|
||||
@@ -197,16 +251,56 @@ PERSONALITY_FUNCTION (int version,
|
||||
int handler_switch_value;
|
||||
bool saw_cleanup;
|
||||
bool saw_handler;
|
||||
+ bool foreign_exception;
|
||||
int ip_before_insn = 0;
|
||||
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+ _Unwind_Action actions;
|
||||
+
|
||||
+ switch (state & _US_ACTION_MASK)
|
||||
+ {
|
||||
+ case _US_VIRTUAL_UNWIND_FRAME:
|
||||
+ actions = _UA_SEARCH_PHASE;
|
||||
+ break;
|
||||
+
|
||||
+ case _US_UNWIND_FRAME_STARTING:
|
||||
+ actions = _UA_CLEANUP_PHASE;
|
||||
+ if (!(state & _US_FORCE_UNWIND)
|
||||
+ && ue_header->barrier_cache.sp == _Unwind_GetGR(context, 13))
|
||||
+ actions |= _UA_HANDLER_FRAME;
|
||||
+ break;
|
||||
+
|
||||
+ case _US_UNWIND_FRAME_RESUME:
|
||||
+ CONTINUE_UNWINDING;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ std::abort();
|
||||
+ }
|
||||
+ actions |= state & _US_FORCE_UNWIND;
|
||||
+
|
||||
+ // We don't know which runtime we're working with, so can't check this.
|
||||
+ // However the ABI routines hide this from us, and we don't actually need
|
||||
+ // to know.
|
||||
+ foreign_exception = false;
|
||||
+
|
||||
+ // The dwarf unwinder assumes the context structure holds things like the
|
||||
+ // function and LSDA pointers. The ARM implementation caches these in
|
||||
+ // the exception header (UCB). To avoid rewriting everything we make the
|
||||
+ // virtual IP register point at the UCB.
|
||||
+ ip = (_Unwind_Ptr) ue_header;
|
||||
+ _Unwind_SetGR(context, 12, ip);
|
||||
|
||||
+#else
|
||||
// Interface version check.
|
||||
if (version != 1)
|
||||
return _URC_FATAL_PHASE1_ERROR;
|
||||
+ foreign_exception = exception_class != __gcj_exception_class;
|
||||
+#endif
|
||||
|
||||
// Shortcut for phase 2 found handler for domestic exception.
|
||||
if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME)
|
||||
- && exception_class == __gcj_exception_class)
|
||||
+ && !foreign_exception)
|
||||
{
|
||||
handler_switch_value = xh->handlerSwitchValue;
|
||||
landing_pad = xh->landingPad;
|
||||
@@ -227,17 +321,17 @@ PERSONALITY_FUNCTION (int version,
|
||||
|
||||
// If no LSDA, then there are no handlers or cleanups.
|
||||
if (! language_specific_data)
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
// Parse the LSDA header.
|
||||
p = parse_lsda_header (context, language_specific_data, &info);
|
||||
#ifdef HAVE_GETIPINFO
|
||||
ip = _Unwind_GetIPInfo (context, &ip_before_insn);
|
||||
- if (! ip_before_insn)
|
||||
- --ip;
|
||||
#else
|
||||
ip = _Unwind_GetIP (context) - 1;
|
||||
#endif
|
||||
+ if (! ip_before_insn)
|
||||
+ --ip;
|
||||
landing_pad = 0;
|
||||
action_record = 0;
|
||||
handler_switch_value = 0;
|
||||
@@ -296,7 +390,7 @@ PERSONALITY_FUNCTION (int version,
|
||||
// If ip is not present in the table, C++ would call terminate.
|
||||
// ??? It is perhaps better to tweek the LSDA so that no-action
|
||||
// is mapped to no-entry for Java.
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
found_something:
|
||||
saw_cleanup = false;
|
||||
@@ -334,7 +428,7 @@ PERSONALITY_FUNCTION (int version,
|
||||
// During forced unwinding, we only run cleanups. With a
|
||||
// foreign exception class, we have no class info to match.
|
||||
else if ((actions & _UA_FORCE_UNWIND)
|
||||
- || exception_class != __gcj_exception_class)
|
||||
+ || foreign_exception)
|
||||
;
|
||||
|
||||
else if (ar_filter > 0)
|
||||
@@ -374,15 +468,15 @@ PERSONALITY_FUNCTION (int version,
|
||||
}
|
||||
|
||||
if (! saw_handler && ! saw_cleanup)
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
if (actions & _UA_SEARCH_PHASE)
|
||||
{
|
||||
if (! saw_handler)
|
||||
- return _URC_CONTINUE_UNWIND;
|
||||
+ CONTINUE_UNWINDING;
|
||||
|
||||
// For domestic exceptions, we cache data from phase 1 for phase 2.
|
||||
- if (exception_class == __gcj_exception_class)
|
||||
+ if (! foreign_exception)
|
||||
{
|
||||
xh->handlerSwitchValue = handler_switch_value;
|
||||
xh->landingPad = landing_pad;
|
||||
@@ -396,5 +490,9 @@ PERSONALITY_FUNCTION (int version,
|
||||
_Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
|
||||
handler_switch_value);
|
||||
_Unwind_SetIP (context, landing_pad);
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+ if (saw_cleanup)
|
||||
+ __cxa_begin_cleanup(ue_header);
|
||||
+#endif
|
||||
return _URC_INSTALL_CONTEXT;
|
||||
}
|
||||
--- libjava/gnu/classpath/natVMStackWalker.cc.jj 2007-09-06 14:06:15.000000000 +0200
|
||||
+++ libjava/gnu/classpath/natVMStackWalker.cc 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -19,6 +19,7 @@ details. */
|
||||
#include <java/lang/ClassLoader.h>
|
||||
#include <java/lang/Class.h>
|
||||
|
||||
+#ifndef __ARM_EABI_UNWINDER__
|
||||
// Return the class of the method that contains PC.
|
||||
// This is a macro not a function, since defining it as one would
|
||||
// introduce an extra frame on the stack. */
|
||||
@@ -44,6 +45,11 @@ details. */
|
||||
\
|
||||
klass; \
|
||||
})
|
||||
+#else // __ARM_EABI_UNWINDER__
|
||||
+// ARM EABI doesn't support _Unwind_FindEnclosingFunction.
|
||||
+#define GET_CALLING_CLASS(PC) \
|
||||
+ (_Jv_StackTrace::GetStackWalkerCallingClass ())
|
||||
+#endif
|
||||
|
||||
JArray<jclass> *
|
||||
gnu::classpath::VMStackWalker::getClassContext(void)
|
||||
@@ -59,14 +65,18 @@ jclass
|
||||
gnu::classpath::VMStackWalker::getCallingClass(void)
|
||||
{
|
||||
_Jv_InitClass (&::gnu::classpath::VMStackWalker::class$);
|
||||
- return _Jv_StackTrace::GetStackWalkerCallingClass ();
|
||||
+ jclass result = _Jv_StackTrace::GetStackWalkerCallingClass ();
|
||||
+ __asm__ __volatile__ ("" : : "g" (result));
|
||||
+ return result;
|
||||
}
|
||||
|
||||
jclass
|
||||
gnu::classpath::VMStackWalker::getCallingClass(::gnu::gcj::RawData *pc)
|
||||
{
|
||||
_Jv_InitClass (&::gnu::classpath::VMStackWalker::class$);
|
||||
- return GET_CALLING_CLASS(pc);
|
||||
+ jclass result = GET_CALLING_CLASS(pc);
|
||||
+ __asm__ __volatile__ ("" : : "g" (result));
|
||||
+ return result;
|
||||
}
|
||||
|
||||
::java::lang::ClassLoader *
|
||||
--- libjava/sysdep/arm/backtrace.h.jj 2007-09-06 17:20:42.000000000 +0200
|
||||
+++ libjava/sysdep/arm/backtrace.h 2007-09-06 17:20:42.000000000 +0200
|
||||
@@ -0,0 +1,35 @@
|
||||
+// backtrace.h - Fallback backtrace implementation. ARM implementation.
|
||||
+
|
||||
+/* Copyright (C) 2005, 2006 Free Software Foundation
|
||||
+
|
||||
+ This file is part of libgcj.
|
||||
+
|
||||
+This software is copyrighted work licensed under the terms of the
|
||||
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
+details. */
|
||||
+
|
||||
+#ifndef __SYSDEP_BACKTRACE_H__
|
||||
+#define __SYSDEP_BACKTRACE_H__
|
||||
+
|
||||
+#include <java-stack.h>
|
||||
+
|
||||
+extern "C"
|
||||
+{
|
||||
+/* Unwind through the call stack calling TRACE_FN with STATE for every stack
|
||||
+ frame. Returns the reason why the unwinding was stopped. */
|
||||
+#ifdef __ARM_EABI_UNWINDER__
|
||||
+
|
||||
+#define _Unwind_FindEnclosingFunction(PC) \
|
||||
+ (PC)
|
||||
+
|
||||
+_Unwind_Reason_Code
|
||||
+fallback_backtrace (_Unwind_Reason_Code (*)(struct _Unwind_Context*, void*), _Jv_UnwindState *)
|
||||
+#else
|
||||
+_Unwind_Reason_Code
|
||||
+fallback_backtrace (_Unwind_Trace_Fn, _Jv_UnwindState *)
|
||||
+#endif
|
||||
+{
|
||||
+ return _URC_NO_REASON;
|
||||
+}
|
||||
+}
|
||||
+#endif
|
32
gcc41-java-arm7.patch
Normal file
32
gcc41-java-arm7.patch
Normal file
@ -0,0 +1,32 @@
|
||||
2007-09-07 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* configure.in (noconfigdirs): Remove target-libffi and
|
||||
target-libjava.
|
||||
* configure: Regenerate.
|
||||
|
||||
--- configure.in (revision 128249)
|
||||
+++ configure.in (revision 128250)
|
||||
@@ -501,8 +501,8 @@ case "${target}" in
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
;;
|
||||
arm*-*-linux-gnueabi)
|
||||
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
- noconfigdirs="$noconfigdirs target-libjava target-libobjc"
|
||||
+ noconfigdirs="$noconfigdirs target-qthreads"
|
||||
+ noconfigdirs="$noconfigdirs target-libobjc"
|
||||
;;
|
||||
arm*-*-symbianelf*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
|
||||
--- configure (revision 128249)
|
||||
+++ configure (revision 128250)
|
||||
@@ -1293,8 +1293,8 @@ case "${target}" in
|
||||
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
;;
|
||||
arm*-*-linux-gnueabi)
|
||||
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
|
||||
- noconfigdirs="$noconfigdirs target-libjava target-libobjc"
|
||||
+ noconfigdirs="$noconfigdirs target-qthreads"
|
||||
+ noconfigdirs="$noconfigdirs target-libobjc"
|
||||
;;
|
||||
arm*-*-symbianelf*)
|
||||
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
|
65
gcc41-java-arm8.patch
Normal file
65
gcc41-java-arm8.patch
Normal file
@ -0,0 +1,65 @@
|
||||
2007-07-13 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* testsuite/libjava.jvmti/jvmti-interp.exp: Likewise.
|
||||
* testsuite/libjava.jni/jni.exp: Use -fdollars-in-identifiers.
|
||||
* testsuite/libjava.jni/cni.exp: Use -fdollars-in-identifiers.
|
||||
* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_compile_cxx_to_o): Likewise.
|
||||
|
||||
--- libjava/testsuite/libjava.cni/cni.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.cni/cni.exp (revision 126622)
|
||||
@@ -10,7 +10,7 @@
|
||||
set oname ${name}.o
|
||||
|
||||
# Find the generated header.
|
||||
- lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
+ lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir -fdollars-in-identifiers"
|
||||
# Find libgcj headers.
|
||||
lappend options "additional_flags=-I$srcdir/.."
|
||||
|
||||
--- libjava/testsuite/libjava.jvmti/jvmti-interp.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.jvmti/jvmti-interp.exp (revision 126622)
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
# Find jni.h and jni_md.h.
|
||||
lappend options "additional_flags=-I$srcdir/../include \
|
||||
- -I$srcdir/../classpath/include"
|
||||
+ -I$srcdir/../classpath/include -fdollars-in-identifiers"
|
||||
|
||||
# Append C++ options
|
||||
lappend options "additional_flags=$options_cxx"
|
||||
--- libjava/testsuite/libjava.jvmti/jvmti.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.jvmti/jvmti.exp (revision 126622)
|
||||
@@ -11,11 +11,11 @@
|
||||
set oname ${name}.o
|
||||
|
||||
# Find the generated header.
|
||||
- lappend options "additional_flags=-g -I. -I.."
|
||||
+ lappend options "additional_flags=-g -I. -I.. -fdollars-in-identifiers"
|
||||
# Find libgcj headers.
|
||||
lappend options "additional_flags=-I$srcdir/.."
|
||||
# Find jvmti.h, jvmti_md.h, jvmti-int.h, jvm.h requirements
|
||||
- lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -I$objdir/../include -I$objdir/../../boehm-gc/include"
|
||||
+ lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -I$objdir/../include -I$objdir/../../boehm-gc/include "
|
||||
|
||||
set x [libjava_prune_warnings \
|
||||
[target_compile $file $oname object $options]]
|
||||
--- libjava/testsuite/libjava.jni/jni.exp (revision 126621)
|
||||
+++ libjava/testsuite/libjava.jni/jni.exp (revision 126622)
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
lappend options "additional_flags=${so_flag} -fPIC"
|
||||
# Find the generated header.
|
||||
- lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
+ lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir -fdollars-in-identifiers"
|
||||
|
||||
# Ensure that the generated header has correct prototypes.
|
||||
set cfile [file rootname $file].c
|
||||
@@ -219,7 +219,7 @@
|
||||
lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir"
|
||||
|
||||
# Find jni.h and jni_md.h.
|
||||
- lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include"
|
||||
+ lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include -fdollars-in-identifiers"
|
||||
|
||||
# Append C++ options
|
||||
lappend options "additional_flags=$options_cxx"
|
225
gcc41-pr23848.patch
Normal file
225
gcc41-pr23848.patch
Normal file
@ -0,0 +1,225 @@
|
||||
2007-11-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/23848
|
||||
* tree-ssa-ccp.c (optimize_stack_restore): New function.
|
||||
(execute_fold_all_builtins): Call optimize_stack_restore for
|
||||
BUILT_IN_STACK_RESTORE.
|
||||
|
||||
* gcc.dg/tree-ssa/pr23848-1.c: New test.
|
||||
* gcc.dg/tree-ssa/pr23848-2.c: New test.
|
||||
* gcc.dg/tree-ssa/pr23848-3.c: New test.
|
||||
* gcc.dg/tree-ssa/pr23848-4.c: New test.
|
||||
|
||||
--- gcc/tree-ssa-ccp.c (revision 130205)
|
||||
+++ gcc/tree-ssa-ccp.c (revision 130206)
|
||||
@@ -2394,6 +2394,75 @@ fold_stmt_inplace (tree stmt)
|
||||
return changed;
|
||||
}
|
||||
|
||||
+/* Try to optimize out __builtin_stack_restore. Optimize it out
|
||||
+ if there is another __builtin_stack_restore in the same basic
|
||||
+ block and no calls or ASM_EXPRs are in between, or if this block's
|
||||
+ only outgoing edge is to EXIT_BLOCK and there are no calls or
|
||||
+ ASM_EXPRs after this __builtin_stack_restore. */
|
||||
+
|
||||
+static tree
|
||||
+optimize_stack_restore (basic_block bb, tree call, block_stmt_iterator i)
|
||||
+{
|
||||
+ tree stack_save, stmt, callee;
|
||||
+
|
||||
+ if (TREE_CODE (call) != CALL_EXPR
|
||||
+ || TREE_OPERAND (call, 1) == NULL_TREE
|
||||
+ || TREE_CHAIN (TREE_OPERAND (call, 1)) != NULL_TREE
|
||||
+ || TREE_CODE (TREE_VALUE (TREE_OPERAND (call, 1))) != SSA_NAME
|
||||
+ || !POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_OPERAND (call, 1)))))
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ for (bsi_next (&i); !bsi_end_p (i); bsi_next (&i))
|
||||
+ {
|
||||
+ tree call;
|
||||
+
|
||||
+ stmt = bsi_stmt (i);
|
||||
+ if (TREE_CODE (stmt) == ASM_EXPR)
|
||||
+ return NULL_TREE;
|
||||
+ call = get_call_expr_in (stmt);
|
||||
+ if (call == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ callee = get_callee_fndecl (call);
|
||||
+ if (!callee || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL)
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ if (DECL_FUNCTION_CODE (callee) == BUILT_IN_STACK_RESTORE)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (bsi_end_p (i)
|
||||
+ && (! single_succ_p (bb)
|
||||
+ || single_succ_edge (bb)->dest != EXIT_BLOCK_PTR))
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ stack_save = SSA_NAME_DEF_STMT (TREE_VALUE (TREE_OPERAND (call, 1)));
|
||||
+ if (TREE_CODE (stack_save) != MODIFY_EXPR
|
||||
+ || TREE_OPERAND (stack_save, 0)
|
||||
+ != TREE_VALUE (TREE_OPERAND (call, 1))
|
||||
+ || TREE_CODE (TREE_OPERAND (stack_save, 1)) != CALL_EXPR
|
||||
+ || tree_could_throw_p (stack_save)
|
||||
+ || !has_single_use (TREE_VALUE (TREE_OPERAND (call, 1))))
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ callee = get_callee_fndecl (TREE_OPERAND (stack_save, 1));
|
||||
+ if (!callee
|
||||
+ || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL
|
||||
+ || DECL_FUNCTION_CODE (callee) != BUILT_IN_STACK_SAVE
|
||||
+ || TREE_OPERAND (TREE_OPERAND (stack_save, 1), 1) != NULL_TREE)
|
||||
+ return NULL_TREE;
|
||||
+
|
||||
+ stmt = stack_save;
|
||||
+ if (!set_rhs (&stmt,
|
||||
+ build_int_cst (TREE_TYPE (TREE_VALUE (TREE_OPERAND (call,
|
||||
+ 1))), 0)))
|
||||
+ return NULL_TREE;
|
||||
+ gcc_assert (stmt == stack_save);
|
||||
+ mark_new_vars_to_rename (stmt);
|
||||
+
|
||||
+ return integer_zero_node;
|
||||
+}
|
||||
+
|
||||
/* Convert EXPR into a GIMPLE value suitable for substitution on the
|
||||
RHS of an assignment. Insert the necessary statements before
|
||||
iterator *SI_P. */
|
||||
@@ -2469,6 +2538,12 @@ execute_fold_all_builtins (void)
|
||||
result = integer_zero_node;
|
||||
break;
|
||||
|
||||
+ case BUILT_IN_STACK_RESTORE:
|
||||
+ result = optimize_stack_restore (bb, *stmtp, i);
|
||||
+ if (result)
|
||||
+ break;
|
||||
+ /* FALLTHRU */
|
||||
+
|
||||
default:
|
||||
bsi_next (&i);
|
||||
continue;
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-1.c (revision 130206)
|
||||
@@ -0,0 +1,32 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar1 (char *, int);
|
||||
+void foo1 (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ bar1 (temp, size);
|
||||
+}
|
||||
+
|
||||
+void bar2 (char *, char *, char *, char *, int);
|
||||
+void foo2 (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar2 (temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "__builtin_stack_save" "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-not "__builtin_stack_restore" "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-2.c (revision 130206)
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar (char *, char *, char *, char *, int);
|
||||
+void foo (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar (temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ bar (temp, temp2, (char *) 0, (char *) 0, size);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-3.c (revision 130206)
|
||||
@@ -0,0 +1,28 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar (int, char *, char *, char *, char *, int);
|
||||
+void foo (int size)
|
||||
+{
|
||||
+ int i;
|
||||
+ for (i = 0; i < size; i++)
|
||||
+ {
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar (i, temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23848-4.c (revision 130206)
|
||||
@@ -0,0 +1,25 @@
|
||||
+/* PR middle-end/23848 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
+
|
||||
+void bar (char *, char *, char *, char *, int);
|
||||
+void foo (int size)
|
||||
+{
|
||||
+ char temp[size];
|
||||
+ temp[size-1] = '\0';
|
||||
+ {
|
||||
+ char temp2[size];
|
||||
+ {
|
||||
+ char temp3[size];
|
||||
+ {
|
||||
+ char temp4[size];
|
||||
+ bar (temp, temp2, temp3, temp4, size);
|
||||
+ }
|
||||
+ }
|
||||
+ __asm __volatile ("" : : "r" (&temp[0]), "r" (&temp2[0]) : "memory");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_save" 1 "optimized"} } */
|
||||
+/* { dg-final { scan-tree-dump-times "__builtin_stack_restore" 1 "optimized"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "optimized" } } */
|
50
gcc41-pr29225.patch
Normal file
50
gcc41-pr29225.patch
Normal file
@ -0,0 +1,50 @@
|
||||
2007-11-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/29225
|
||||
* call.c (build_new_op): Call resolve_args before calling
|
||||
build_over_call.
|
||||
|
||||
* g++.dg/template/crash72.C: New test.
|
||||
|
||||
--- gcc/cp/call.c (revision 130125)
|
||||
+++ gcc/cp/call.c (revision 130126)
|
||||
@@ -3918,7 +3918,10 @@ build_new_op (enum tree_code code, int f
|
||||
if (overloaded_p)
|
||||
*overloaded_p = true;
|
||||
|
||||
- result = build_over_call (cand, LOOKUP_NORMAL);
|
||||
+ if (resolve_args (arglist) == error_mark_node)
|
||||
+ result = error_mark_node;
|
||||
+ else
|
||||
+ result = build_over_call (cand, LOOKUP_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
--- gcc/testsuite/g++.dg/template/crash72.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/crash72.C (revision 130126)
|
||||
@@ -0,0 +1,25 @@
|
||||
+// PR c++/29225
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template <typename L, typename R> bool operator< (L x, R y);
|
||||
+struct T { int t (); };
|
||||
+class S {};
|
||||
+
|
||||
+struct U
|
||||
+{
|
||||
+ typedef int (T::* M) ();
|
||||
+ M m;
|
||||
+
|
||||
+ bool operator() (S &x)
|
||||
+ {
|
||||
+ T a;
|
||||
+ return (a.*m) < x; // { dg-error "invalid use of non-static member" }
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+void foo (S &x)
|
||||
+{
|
||||
+ U m;
|
||||
+ m.m = &T::t;
|
||||
+ m (x);
|
||||
+}
|
55
gcc41-pr29712.patch
Normal file
55
gcc41-pr29712.patch
Normal file
@ -0,0 +1,55 @@
|
||||
2007-01-15 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/29712
|
||||
* resolve.c (resolve_function): Only a reference to the final
|
||||
dimension of an assumed size array is an error in an inquiry
|
||||
function.
|
||||
|
||||
* gfortran.dg/bound_2.f90: Reinstate commented out line.
|
||||
* gfortran.dg/initialization_1.f90: Change warning.
|
||||
|
||||
--- gcc/fortran/resolve.c (revision 120789)
|
||||
+++ gcc/fortran/resolve.c (revision 120790)
|
||||
@@ -1498,10 +1498,16 @@ resolve_function (gfc_expr * expr)
|
||||
|
||||
for (arg = expr->value.function.actual; arg; arg = arg->next)
|
||||
{
|
||||
- if (inquiry && arg->next != NULL && arg->next->expr
|
||||
- && arg->next->expr->expr_type != EXPR_CONSTANT)
|
||||
- break;
|
||||
-
|
||||
+ if (inquiry && arg->next != NULL && arg->next->expr)
|
||||
+ {
|
||||
+ if (arg->next->expr->expr_type != EXPR_CONSTANT)
|
||||
+ break;
|
||||
+
|
||||
+ if ((int)mpz_get_si (arg->next->expr->value.integer)
|
||||
+ < arg->expr->rank)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if (arg->expr != NULL
|
||||
&& arg->expr->rank > 0
|
||||
&& resolve_assumed_size_actual (arg->expr))
|
||||
--- gcc/testsuite/gfortran.dg/initialization_1.f90 (revision 120789)
|
||||
+++ gcc/testsuite/gfortran.dg/initialization_1.f90 (revision 120790)
|
||||
@@ -27,7 +27,7 @@ contains
|
||||
integer :: l1 = len (ch1) ! { dg-warning "assumed character length variable" }
|
||||
|
||||
! These are warnings because they are gfortran extensions.
|
||||
- integer :: m3 = size (x, 1) ! { dg-warning "upper bound in the last dimension" }
|
||||
+ integer :: m3 = size (x, 1) ! { dg-warning "Evaluation of nonstandard initialization" }
|
||||
integer :: m4(2) = shape (z) ! { dg-warning "Evaluation of nonstandard initialization" }
|
||||
|
||||
! This does not depend on non-constant properties.
|
||||
--- gcc/testsuite/gfortran.dg/bound_2.f90 (revision 120789)
|
||||
+++ gcc/testsuite/gfortran.dg/bound_2.f90 (revision 120790)
|
||||
@@ -194,7 +194,7 @@ contains
|
||||
subroutine foo (x,n)
|
||||
integer :: x(7,n,2,*), n
|
||||
|
||||
- !if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
|
||||
+ if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
|
||||
end subroutine foo
|
||||
|
||||
subroutine jackal (b, c)
|
180
gcc41-pr30293.patch
Normal file
180
gcc41-pr30293.patch
Normal file
@ -0,0 +1,180 @@
|
||||
2007-11-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/30293
|
||||
PR c++/30294
|
||||
* decl.c (cp_finish_decl): Disallow variable or field
|
||||
definitions if extern "Java" aggregates.
|
||||
(grokparms): Disallow parameters with extern "Java"
|
||||
aggregates.
|
||||
(check_function_type): Disallow function return values
|
||||
with extern "Java" aggregates.
|
||||
* init.c (build_new_1): Disallow placement new with
|
||||
extern "Java" aggregates.
|
||||
|
||||
* g++.dg/ext/java-2.C: New test.
|
||||
|
||||
--- gcc/cp/decl.c.jj 2007-11-19 17:46:41.000000000 +0100
|
||||
+++ gcc/cp/decl.c 2007-11-22 13:34:52.000000000 +0100
|
||||
@@ -5349,6 +5349,20 @@ cp_finish_decl (tree decl, tree init, bo
|
||||
is *not* defined. */
|
||||
&& (!DECL_EXTERNAL (decl) || init))
|
||||
{
|
||||
+ if (TYPE_FOR_JAVA (type) && IS_AGGR_TYPE (type))
|
||||
+ {
|
||||
+ tree jclass
|
||||
+ = IDENTIFIER_GLOBAL_VALUE (get_identifier ("jclass"));
|
||||
+ /* Allow libjava/prims.cc define primitive classes. */
|
||||
+ if (init != NULL_TREE
|
||||
+ || jclass == NULL_TREE
|
||||
+ || TREE_CODE (jclass) != TYPE_DECL
|
||||
+ || !POINTER_TYPE_P (TREE_TYPE (jclass))
|
||||
+ || !same_type_ignoring_top_level_qualifiers_p
|
||||
+ (type, TREE_TYPE (TREE_TYPE (jclass))))
|
||||
+ error ("Java object %qD not allocated with %<new%>", decl);
|
||||
+ init = NULL_TREE;
|
||||
+ }
|
||||
if (init)
|
||||
{
|
||||
DECL_NONTRIVIALLY_INITIALIZED_P (decl) = 1;
|
||||
@@ -5419,6 +5433,9 @@ cp_finish_decl (tree decl, tree init, bo
|
||||
else if (TREE_CODE (type) == ARRAY_TYPE)
|
||||
layout_type (type);
|
||||
}
|
||||
+ else if (TREE_CODE (decl) == FIELD_DECL
|
||||
+ && TYPE_FOR_JAVA (type) && IS_AGGR_TYPE (type))
|
||||
+ error ("non-static data member %qD has Java class type", decl);
|
||||
|
||||
/* Add this declaration to the statement-tree. This needs to happen
|
||||
after the call to check_initializer so that the DECL_EXPR for a
|
||||
@@ -8993,6 +9010,16 @@ grokparms (cp_parameter_declarator *firs
|
||||
TREE_TYPE (decl) = error_mark_node;
|
||||
}
|
||||
|
||||
+ if (type != error_mark_node
|
||||
+ && TYPE_FOR_JAVA (type)
|
||||
+ && IS_AGGR_TYPE (type))
|
||||
+ {
|
||||
+ error ("parameter %qD has Java class type", decl);
|
||||
+ type = error_mark_node;
|
||||
+ TREE_TYPE (decl) = error_mark_node;
|
||||
+ init = NULL_TREE;
|
||||
+ }
|
||||
+
|
||||
if (type != error_mark_node)
|
||||
{
|
||||
/* Top-level qualifiers on the parameters are
|
||||
@@ -10465,11 +10492,15 @@ check_function_type (tree decl, tree cur
|
||||
|
||||
if (dependent_type_p (return_type))
|
||||
return;
|
||||
- if (!COMPLETE_OR_VOID_TYPE_P (return_type))
|
||||
+ if (!COMPLETE_OR_VOID_TYPE_P (return_type)
|
||||
+ || (TYPE_FOR_JAVA (return_type) && IS_AGGR_TYPE (return_type)))
|
||||
{
|
||||
tree args = TYPE_ARG_TYPES (fntype);
|
||||
-
|
||||
- error ("return type %q#T is incomplete", return_type);
|
||||
+
|
||||
+ if (!COMPLETE_OR_VOID_TYPE_P (return_type))
|
||||
+ error ("return type %q#T is incomplete", return_type);
|
||||
+ else
|
||||
+ error ("return type has Java class type %q#T", return_type);
|
||||
|
||||
/* Make it return void instead. */
|
||||
if (TREE_CODE (fntype) == METHOD_TYPE)
|
||||
--- gcc/cp/init.c.jj 2007-09-20 21:26:48.000000000 +0200
|
||||
+++ gcc/cp/init.c 2007-11-22 10:49:47.000000000 +0100
|
||||
@@ -1786,6 +1786,11 @@ build_new_1 (tree placement, tree type,
|
||||
(alloc_fn,
|
||||
build_tree_list (NULL_TREE, class_addr)));
|
||||
}
|
||||
+ else if (TYPE_FOR_JAVA (elt_type))
|
||||
+ {
|
||||
+ error ("Java class %q#T object allocated using placement new", elt_type);
|
||||
+ return error_mark_node;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
tree fnname;
|
||||
--- gcc/testsuite/g++.dg/ext/java-2.C.jj 2007-11-22 10:55:10.000000000 +0100
|
||||
+++ gcc/testsuite/g++.dg/ext/java-2.C 2007-11-22 10:54:59.000000000 +0100
|
||||
@@ -0,0 +1,79 @@
|
||||
+// PR c++/30293
|
||||
+// PR c++/30294
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "" }
|
||||
+
|
||||
+extern "Java" {
|
||||
+typedef __java_byte jbyte;
|
||||
+namespace java {
|
||||
+namespace lang {
|
||||
+ class Object {};
|
||||
+ class Class {};
|
||||
+}
|
||||
+}
|
||||
+typedef struct java::lang::Object* jobject;
|
||||
+typedef java::lang::Class *jclass;
|
||||
+}
|
||||
+extern "C" jobject _Jv_AllocObject (jclass);
|
||||
+
|
||||
+extern "Java" {
|
||||
+ struct A { static java::lang::Class class$; };
|
||||
+}
|
||||
+
|
||||
+struct B {
|
||||
+ A a; // { dg-error "has Java class type" }
|
||||
+};
|
||||
+
|
||||
+void* operator new (__SIZE_TYPE__, void*) throw();
|
||||
+char buf[1024];
|
||||
+
|
||||
+A a; // { dg-error "not allocated with" }
|
||||
+A b = A (); // { dg-error "not allocated with" }
|
||||
+A *c = new ((void *) buf) A (); // { dg-error "using placement new" }
|
||||
+A *d = new A ();
|
||||
+jbyte e = 6;
|
||||
+
|
||||
+const A fn1 () // { dg-error "return type has Java class type" }
|
||||
+{
|
||||
+ A a; // { dg-error "not allocated with" }
|
||||
+ return a;
|
||||
+}
|
||||
+
|
||||
+A fn2 () // { dg-error "return type has Java class type" }
|
||||
+{
|
||||
+ A a; // { dg-error "not allocated with" }
|
||||
+ return a;
|
||||
+}
|
||||
+
|
||||
+A *fn3 ()
|
||||
+{
|
||||
+ return new A ();
|
||||
+}
|
||||
+
|
||||
+A &fn4 ()
|
||||
+{
|
||||
+ return *c;
|
||||
+}
|
||||
+
|
||||
+jbyte fn5 ()
|
||||
+{
|
||||
+ return 7;
|
||||
+}
|
||||
+
|
||||
+void fn6 (A x) // { dg-error "has Java class type" }
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void fn7 (const A x) // { dg-error "has Java class type" }
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void fn8 (A *x)
|
||||
+{
|
||||
+ (void) x;
|
||||
+}
|
||||
+
|
||||
+void fn9 (jbyte x)
|
||||
+{
|
||||
+ (void) x;
|
||||
+}
|
103
gcc41-pr30988.patch
Normal file
103
gcc41-pr30988.patch
Normal file
@ -0,0 +1,103 @@
|
||||
2007-11-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/30988
|
||||
* semantics.c (finish_call_expr): Set
|
||||
current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
|
||||
or OVERLOAD with all noreturn functions.
|
||||
|
||||
* g++.dg/warn/noreturn-4.C: New test.
|
||||
* g++.dg/warn/noreturn-5.C: New test.
|
||||
* g++.dg/warn/noreturn-6.C: New test.
|
||||
* g++.dg/warn/noreturn-7.C: New test.
|
||||
|
||||
--- gcc/cp/semantics.c (revision 130279)
|
||||
+++ gcc/cp/semantics.c (revision 130280)
|
||||
@@ -1846,6 +1846,20 @@ finish_call_expr (tree fn, tree args, bo
|
||||
{
|
||||
result = build_nt_call_list (fn, args);
|
||||
KOENIG_LOOKUP_P (result) = koenig_p;
|
||||
+ if (cfun)
|
||||
+ {
|
||||
+ do
|
||||
+ {
|
||||
+ tree fndecl = OVL_CURRENT (fn);
|
||||
+ if (TREE_CODE (fndecl) != FUNCTION_DECL
|
||||
+ || !TREE_THIS_VOLATILE (fndecl))
|
||||
+ break;
|
||||
+ fn = OVL_NEXT (fn);
|
||||
+ }
|
||||
+ while (fn);
|
||||
+ if (!fn)
|
||||
+ current_function_returns_abnormally = 1;
|
||||
+ }
|
||||
return result;
|
||||
}
|
||||
if (!BASELINK_P (fn)
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-4.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-4.C (revision 130280)
|
||||
@@ -0,0 +1,13 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *) __attribute__ ((noreturn));
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f (__FUNCTION__);
|
||||
+ }
|
||||
+};
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-5.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-5.C (revision 130280)
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *) __attribute__ ((noreturn));
|
||||
+void f (int) __attribute__ ((noreturn));
|
||||
+void f (double) __attribute__ ((noreturn));
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f ((T) 0);
|
||||
+ }
|
||||
+};
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-6.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-6.C (revision 130280)
|
||||
@@ -0,0 +1,13 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *);
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f (__FUNCTION__);
|
||||
+ } // { dg-warning "no return statement in function returning non-void" }
|
||||
+};
|
||||
--- gcc/testsuite/g++.dg/warn/noreturn-7.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/noreturn-7.C (revision 130280)
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/30988
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-O2 -Wall" }
|
||||
+
|
||||
+void f (const char *) __attribute__ ((noreturn));
|
||||
+void f (int);
|
||||
+void f (double) __attribute__ ((noreturn));
|
||||
+
|
||||
+template <typename T> struct A
|
||||
+{
|
||||
+ int g ()
|
||||
+ {
|
||||
+ f ((T) 0);
|
||||
+ } // { dg-warning "no return statement in function returning non-void" }
|
||||
+};
|
91
gcc41-pr32241.patch
Normal file
91
gcc41-pr32241.patch
Normal file
@ -0,0 +1,91 @@
|
||||
2007-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/32241
|
||||
* pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
|
||||
is not scalar type, let finish_class_member_access_expr handle
|
||||
diagnostics. Pass BIT_NOT_EXPR argument to
|
||||
finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
|
||||
|
||||
* g++.dg/template/pseudodtor3.C: New test.
|
||||
|
||||
--- gcc/cp/pt.c (revision 130065)
|
||||
+++ gcc/cp/pt.c (revision 130066)
|
||||
@@ -11004,15 +11004,23 @@ tsubst_copy_and_build (tree t,
|
||||
|
||||
if (object_type && !CLASS_TYPE_P (object_type))
|
||||
{
|
||||
- if (TREE_CODE (member) == BIT_NOT_EXPR)
|
||||
- return finish_pseudo_destructor_expr (object,
|
||||
- NULL_TREE,
|
||||
- object_type);
|
||||
- else if (TREE_CODE (member) == SCOPE_REF
|
||||
- && (TREE_CODE (TREE_OPERAND (member, 1)) == BIT_NOT_EXPR))
|
||||
- return finish_pseudo_destructor_expr (object,
|
||||
- object,
|
||||
- object_type);
|
||||
+ if (SCALAR_TYPE_P (object_type))
|
||||
+ {
|
||||
+ tree s = NULL_TREE;
|
||||
+ tree dtor = member;
|
||||
+
|
||||
+ if (TREE_CODE (dtor) == SCOPE_REF)
|
||||
+ {
|
||||
+ s = TREE_OPERAND (dtor, 0);
|
||||
+ dtor = TREE_OPERAND (dtor, 1);
|
||||
+ }
|
||||
+ if (TREE_CODE (dtor) == BIT_NOT_EXPR)
|
||||
+ {
|
||||
+ dtor = TREE_OPERAND (dtor, 0);
|
||||
+ if (TYPE_P (dtor))
|
||||
+ return finish_pseudo_destructor_expr (object, s, dtor);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else if (TREE_CODE (member) == SCOPE_REF
|
||||
&& TREE_CODE (TREE_OPERAND (member, 1)) == TEMPLATE_ID_EXPR)
|
||||
--- gcc/testsuite/g++.dg/template/pseudodtor3.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/pseudodtor3.C (revision 130066)
|
||||
@@ -0,0 +1,43 @@
|
||||
+// PR c++/32241
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ T &foo ();
|
||||
+ A () { foo.~T (); } // { dg-error "does not have class type|expected" }
|
||||
+};
|
||||
+
|
||||
+template <typename T> struct B
|
||||
+{
|
||||
+ T &foo ();
|
||||
+ B () { foo.~T (); } // { dg-error "invalid use of member" }
|
||||
+};
|
||||
+
|
||||
+B<int> b;
|
||||
+
|
||||
+template <typename T, typename S> struct C
|
||||
+{
|
||||
+ T t;
|
||||
+ C () { t.~S (); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+C<int, long int> c;
|
||||
+
|
||||
+template <typename T> struct D
|
||||
+{
|
||||
+ T t;
|
||||
+ typedef long int U;
|
||||
+ D () { t.~U (); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+D<int> d;
|
||||
+
|
||||
+template <typename T> struct E
|
||||
+{
|
||||
+ T &foo ();
|
||||
+ typedef long int U;
|
||||
+ E () { foo.~U (); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+E<int> e;
|
108
gcc41-pr32384.patch
Normal file
108
gcc41-pr32384.patch
Normal file
@ -0,0 +1,108 @@
|
||||
2007-11-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/32384
|
||||
* parser.c (cp_parser_postfix_dot_deref_expression): If
|
||||
POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
|
||||
first and if that succeeds and type is SCALAR_TYPE_P, create
|
||||
PSEUDO_DTOR_EXPR.
|
||||
|
||||
* g++.dg/template/pseudodtor1.C: New test.
|
||||
* g++.dg/template/pseudodtor2.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129835)
|
||||
+++ gcc/cp/parser.c (revision 129836)
|
||||
@@ -4850,8 +4850,10 @@ cp_parser_postfix_dot_deref_expression (
|
||||
pseudo_destructor_p = false;
|
||||
|
||||
/* If the SCOPE is a scalar type, then, if this is a valid program,
|
||||
- we must be looking at a pseudo-destructor-name. */
|
||||
- if (scope && SCALAR_TYPE_P (scope))
|
||||
+ we must be looking at a pseudo-destructor-name. If POSTFIX_EXPRESSION
|
||||
+ is type dependent, it can be pseudo-destructor-name or something else.
|
||||
+ Try to parse it as pseudo-destructor-name first. */
|
||||
+ if ((scope && SCALAR_TYPE_P (scope)) || dependent_p)
|
||||
{
|
||||
tree s;
|
||||
tree type;
|
||||
@@ -4860,7 +4862,12 @@ cp_parser_postfix_dot_deref_expression (
|
||||
/* Parse the pseudo-destructor-name. */
|
||||
s = NULL_TREE;
|
||||
cp_parser_pseudo_destructor_name (parser, &s, &type);
|
||||
- if (cp_parser_parse_definitely (parser))
|
||||
+ if (dependent_p
|
||||
+ && (cp_parser_error_occurred (parser)
|
||||
+ || TREE_CODE (type) != TYPE_DECL
|
||||
+ || !SCALAR_TYPE_P (TREE_TYPE (type))))
|
||||
+ cp_parser_abort_tentative_parse (parser);
|
||||
+ else if (cp_parser_parse_definitely (parser))
|
||||
{
|
||||
pseudo_destructor_p = true;
|
||||
postfix_expression
|
||||
--- gcc/testsuite/g++.dg/template/pseudodtor1.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/pseudodtor1.C (revision 129836)
|
||||
@@ -0,0 +1,44 @@
|
||||
+// PR c++/32384
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ T foo ();
|
||||
+
|
||||
+ A () { foo ().~T (); }
|
||||
+};
|
||||
+
|
||||
+template<typename> struct B
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ T foo ();
|
||||
+
|
||||
+ B () { foo ().~T (); }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct C
|
||||
+{
|
||||
+ T t;
|
||||
+ C () { t.~T (); }
|
||||
+};
|
||||
+
|
||||
+template<typename S> struct D
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ S foo ();
|
||||
+
|
||||
+ D () { foo ().~T(); }
|
||||
+};
|
||||
+
|
||||
+struct Z
|
||||
+{
|
||||
+ Z () {}
|
||||
+ ~Z () {}
|
||||
+};
|
||||
+
|
||||
+A a;
|
||||
+B<int> b;
|
||||
+C<int> c1;
|
||||
+C<Z> c2;
|
||||
+D<int> d;
|
||||
--- gcc/testsuite/g++.dg/template/pseudodtor2.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/pseudodtor2.C (revision 129836)
|
||||
@@ -0,0 +1,18 @@
|
||||
+// PR c++/32384
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template<typename S> struct D
|
||||
+{
|
||||
+ typedef int T;
|
||||
+ S foo ();
|
||||
+
|
||||
+ D () { foo ().~T(); } // { dg-error "is not of type" }
|
||||
+};
|
||||
+
|
||||
+struct Z
|
||||
+{
|
||||
+ Z () {}
|
||||
+ ~Z () {}
|
||||
+};
|
||||
+
|
||||
+D<Z> d;
|
77
gcc41-pr33501.patch
Normal file
77
gcc41-pr33501.patch
Normal file
@ -0,0 +1,77 @@
|
||||
2007-11-07 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33501
|
||||
* call.c (build_over_call): Don't check TREE_ADDRESSABLE
|
||||
on incomplete type.
|
||||
|
||||
* g++.dg/warn/incomplete2.C: New test.
|
||||
* g++.dg/template/incomplete4.C: New test.
|
||||
* g++.dg/template/incomplete5.C: New test.
|
||||
|
||||
--- gcc/cp/call.c (revision 129967)
|
||||
+++ gcc/cp/call.c (revision 129968)
|
||||
@@ -4993,7 +4993,8 @@ build_over_call (struct z_candidate *can
|
||||
|
||||
/* Don't make a copy here if build_call is going to. */
|
||||
if (conv->kind == ck_rvalue
|
||||
- && !TREE_ADDRESSABLE (complete_type (type)))
|
||||
+ && COMPLETE_TYPE_P (complete_type (type))
|
||||
+ && !TREE_ADDRESSABLE (type))
|
||||
conv = conv->u.next;
|
||||
|
||||
val = convert_like_with_context
|
||||
--- gcc/testsuite/g++.dg/warn/incomplete2.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/warn/incomplete2.C (revision 129968)
|
||||
@@ -0,0 +1,13 @@
|
||||
+// PR c++/33501
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+class A; // { dg-error "forward declaration" }
|
||||
+
|
||||
+int f (A);
|
||||
+const A &make ();
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return f (make ()); // { dg-error "invalid use of undefined type|initializing argument" }
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/template/incomplete5.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/incomplete5.C (revision 129968)
|
||||
@@ -0,0 +1,17 @@
|
||||
+// PR c++/33501
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+class A; // { dg-error "forward declaration" }
|
||||
+
|
||||
+template <typename T> struct X
|
||||
+{
|
||||
+ static int f (T);
|
||||
+ static const T &make ();
|
||||
+ static const bool value = sizeof (f (make ())) == sizeof (int); // { dg-error "invalid use of undefined type|initializing argument" }
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return X <A>::value;
|
||||
+}
|
||||
--- gcc/testsuite/g++.dg/template/incomplete4.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/incomplete4.C (revision 129968)
|
||||
@@ -0,0 +1,16 @@
|
||||
+// PR c++/33501
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+class A; // { dg-error "forward declaration" }
|
||||
+
|
||||
+template <typename T> struct X
|
||||
+{
|
||||
+ static int f (T);
|
||||
+ static const T &make ();
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return X<A>::f (X<A>::make ()); // { dg-error "invalid use of undefined type|initializing argument" }
|
||||
+}
|
63
gcc41-pr33516.patch
Normal file
63
gcc41-pr33516.patch
Normal file
@ -0,0 +1,63 @@
|
||||
2007-11-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33516
|
||||
* parser.c (cp_parser_nested_name_specifier_opt): Use
|
||||
TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
|
||||
typedef of currently open class.
|
||||
|
||||
* g++.dg/lookup/typedef1.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129861)
|
||||
+++ gcc/cp/parser.c (revision 129862)
|
||||
@@ -4085,7 +4085,15 @@ cp_parser_nested_name_specifier_opt (cp_
|
||||
&& !COMPLETE_TYPE_P (new_scope)
|
||||
/* Do not try to complete dependent types. */
|
||||
&& !dependent_type_p (new_scope))
|
||||
- new_scope = complete_type (new_scope);
|
||||
+ {
|
||||
+ new_scope = complete_type (new_scope);
|
||||
+ /* If it is a typedef to current class, use the current
|
||||
+ class instead, as the typedef won't have any names inside
|
||||
+ it yet. */
|
||||
+ if (!COMPLETE_TYPE_P (new_scope)
|
||||
+ && currently_open_class (new_scope))
|
||||
+ new_scope = TYPE_MAIN_VARIANT (new_scope);
|
||||
+ }
|
||||
/* Make sure we look in the right scope the next time through
|
||||
the loop. */
|
||||
parser->scope = new_scope;
|
||||
--- gcc/testsuite/g++.dg/lookup/typedef1.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/lookup/typedef1.C (revision 129862)
|
||||
@@ -0,0 +1,32 @@
|
||||
+// PR c++/33516
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct S1;
|
||||
+typedef S1 T1;
|
||||
+struct S1 {
|
||||
+ typedef int U;
|
||||
+ T1::U i;
|
||||
+};
|
||||
+struct S2;
|
||||
+typedef S2 T2;
|
||||
+struct S2 {
|
||||
+ typedef int U;
|
||||
+};
|
||||
+T2::U j;
|
||||
+struct S3;
|
||||
+typedef S3 T3;
|
||||
+struct S3 {
|
||||
+ typedef int U;
|
||||
+ S3::U i;
|
||||
+};
|
||||
+
|
||||
+void
|
||||
+foo ()
|
||||
+{
|
||||
+ S1 s1;
|
||||
+ S2 s2;
|
||||
+ S3 s3;
|
||||
+ s1.i = 6;
|
||||
+ j = 7;
|
||||
+ s3.i = 8;
|
||||
+}
|
62
gcc41-pr33537.patch
Normal file
62
gcc41-pr33537.patch
Normal file
@ -0,0 +1,62 @@
|
||||
2007-11-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/33537
|
||||
* dwarf2out.c (gen_formal_parameter_die, gen_variable_die,
|
||||
gen_decl_die): Use TREE_TYPE (TREE_TYPE (decl)) as type
|
||||
rather than TREE_TYPE (decl) if DECL_BY_REFERENCE (decl).
|
||||
|
||||
--- gcc/dwarf2out.c (revision 129819)
|
||||
+++ gcc/dwarf2out.c (revision 129820)
|
||||
@@ -11832,8 +11832,11 @@ gen_formal_parameter_die (tree node, dw_
|
||||
add_abstract_origin_attribute (parm_die, origin);
|
||||
else
|
||||
{
|
||||
+ tree type = TREE_TYPE (node);
|
||||
add_name_and_src_coords_attributes (parm_die, node);
|
||||
- add_type_attribute (parm_die, TREE_TYPE (node),
|
||||
+ if (DECL_BY_REFERENCE (node))
|
||||
+ type = TREE_TYPE (type);
|
||||
+ add_type_attribute (parm_die, type,
|
||||
TREE_READONLY (node),
|
||||
TREE_THIS_VOLATILE (node),
|
||||
context_die);
|
||||
@@ -12437,8 +12440,14 @@ gen_variable_die (tree decl, dw_die_ref
|
||||
}
|
||||
else
|
||||
{
|
||||
+ tree type = TREE_TYPE (decl);
|
||||
+ if ((TREE_CODE (decl) == PARM_DECL
|
||||
+ || TREE_CODE (decl) == RESULT_DECL)
|
||||
+ && DECL_BY_REFERENCE (decl))
|
||||
+ type = TREE_TYPE (type);
|
||||
+
|
||||
add_name_and_src_coords_attributes (var_die, decl);
|
||||
- add_type_attribute (var_die, TREE_TYPE (decl), TREE_READONLY (decl),
|
||||
+ add_type_attribute (var_die, type, TREE_READONLY (decl),
|
||||
TREE_THIS_VOLATILE (decl), context_die);
|
||||
|
||||
if (TREE_PUBLIC (decl))
|
||||
@@ -13694,7 +13703,10 @@ gen_decl_die (tree decl, dw_die_ref cont
|
||||
|
||||
/* Output any DIEs that are needed to specify the type of this data
|
||||
object. */
|
||||
- gen_type_die (TREE_TYPE (decl), context_die);
|
||||
+ if (TREE_CODE (decl) == RESULT_DECL && DECL_BY_REFERENCE (decl))
|
||||
+ gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
|
||||
+ else
|
||||
+ gen_type_die (TREE_TYPE (decl), context_die);
|
||||
|
||||
/* And its containing type. */
|
||||
origin = decl_class_context (decl);
|
||||
@@ -13728,7 +13740,10 @@ gen_decl_die (tree decl, dw_die_ref cont
|
||||
break;
|
||||
|
||||
case PARM_DECL:
|
||||
- gen_type_die (TREE_TYPE (decl), context_die);
|
||||
+ if (DECL_BY_REFERENCE (decl))
|
||||
+ gen_type_die (TREE_TYPE (TREE_TYPE (decl)), context_die);
|
||||
+ else
|
||||
+ gen_type_die (TREE_TYPE (decl), context_die);
|
||||
gen_formal_parameter_die (decl, context_die);
|
||||
break;
|
||||
|
74
gcc41-pr33616.patch
Normal file
74
gcc41-pr33616.patch
Normal file
@ -0,0 +1,74 @@
|
||||
2007-10-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33616
|
||||
* decl2.c (build_offset_ref_call_from_tree): Call
|
||||
build_non_dependent_expr on object prior to building ADDR_EXPR from it
|
||||
if FN is DOTSTAR_EXPR.
|
||||
|
||||
* g++.dg/template/ptrmem18.C: New test.
|
||||
|
||||
--- gcc/cp/decl2.c (revision 129783)
|
||||
+++ gcc/cp/decl2.c (revision 129784)
|
||||
@@ -3499,9 +3499,9 @@ build_offset_ref_call_from_tree (tree fn
|
||||
parameter. That must be done before the FN is transformed
|
||||
because we depend on the form of FN. */
|
||||
args = build_non_dependent_args (args);
|
||||
+ object = build_non_dependent_expr (object);
|
||||
if (TREE_CODE (fn) == DOTSTAR_EXPR)
|
||||
object = build_unary_op (ADDR_EXPR, object, 0);
|
||||
- object = build_non_dependent_expr (object);
|
||||
args = tree_cons (NULL_TREE, object, args);
|
||||
/* Now that the arguments are done, transform FN. */
|
||||
fn = build_non_dependent_expr (fn);
|
||||
--- gcc/testsuite/g++.dg/template/ptrmem18.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/ptrmem18.C (revision 129784)
|
||||
@@ -0,0 +1,49 @@
|
||||
+// PR c++/33616
|
||||
+// { dg-do run }
|
||||
+// { dg-options "-O2" }
|
||||
+
|
||||
+extern "C" void abort ();
|
||||
+
|
||||
+struct S {
|
||||
+ int c;
|
||||
+ S () : c (0) {}
|
||||
+ virtual void f1 () { c += 1; }
|
||||
+ virtual void f2 () { c += 16; }
|
||||
+};
|
||||
+
|
||||
+struct T {
|
||||
+ S s;
|
||||
+};
|
||||
+
|
||||
+typedef void (S::*Q) ();
|
||||
+
|
||||
+template <Q P>
|
||||
+void test1 (T *t)
|
||||
+{
|
||||
+ (t->s.*P)();
|
||||
+}
|
||||
+
|
||||
+template <Q P>
|
||||
+void test2 (T *t)
|
||||
+{
|
||||
+ S &s = t->s;
|
||||
+ (s.*P)();
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ T t;
|
||||
+ test1 <&S::f1> (&t);
|
||||
+ if (t.s.c != 1)
|
||||
+ abort ();
|
||||
+ test1 <&S::f2> (&t);
|
||||
+ if (t.s.c != 17)
|
||||
+ abort ();
|
||||
+ test2 <&S::f1> (&t);
|
||||
+ if (t.s.c != 18)
|
||||
+ abort ();
|
||||
+ test2 <&S::f2> (&t);
|
||||
+ if (t.s.c != 34)
|
||||
+ abort ();
|
||||
+}
|
189
gcc41-pr33723.patch
Normal file
189
gcc41-pr33723.patch
Normal file
@ -0,0 +1,189 @@
|
||||
2007-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33723
|
||||
* c-gimplify.c (c_gimplify_expr): Optimize INIT_EXPR or
|
||||
MODIFY_EXPR with non-addressable COMPOUND_LITERAL_EXPR as source.
|
||||
|
||||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR testsuite/33978
|
||||
* gcc.dg/tree-ssa/pr33723.c: Adjust scan pattern to make it less
|
||||
dependent on target settings like move_by_pieces etc.
|
||||
|
||||
2007-10-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33723
|
||||
* gcc.dg/tree-ssa/pr33723.c (T): Decrease size of field s.
|
||||
|
||||
2007-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33723
|
||||
* gcc.c-torture/execute/20071029-1.c: New test.
|
||||
* gcc.dg/tree-ssa/pr33723.c: New test.
|
||||
|
||||
--- gcc/c-gimplify.c (revision 129742)
|
||||
+++ gcc/c-gimplify.c (revision 129743)
|
||||
@@ -233,6 +233,29 @@ c_gimplify_expr (tree *expr_p, tree *pre
|
||||
case COMPOUND_LITERAL_EXPR:
|
||||
return gimplify_compound_literal_expr (expr_p, pre_p);
|
||||
|
||||
+ case INIT_EXPR:
|
||||
+ case MODIFY_EXPR:
|
||||
+ if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == COMPOUND_LITERAL_EXPR)
|
||||
+ {
|
||||
+ tree complit = TREE_OPERAND (*expr_p, 1);
|
||||
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (complit);
|
||||
+ tree decl = DECL_EXPR_DECL (decl_s);
|
||||
+ tree init = DECL_INITIAL (decl);
|
||||
+
|
||||
+ /* struct T x = (struct T) { 0, 1, 2 } can be optimized
|
||||
+ into struct T x = { 0, 1, 2 } if the address of the
|
||||
+ compound literal has never been taken. */
|
||||
+ if (!TREE_ADDRESSABLE (complit)
|
||||
+ && !TREE_ADDRESSABLE (decl)
|
||||
+ && init)
|
||||
+ {
|
||||
+ *expr_p = copy_node (*expr_p);
|
||||
+ TREE_OPERAND (*expr_p, 1) = init;
|
||||
+ return GS_OK;
|
||||
+ }
|
||||
+ }
|
||||
+ return GS_UNHANDLED;
|
||||
+
|
||||
default:
|
||||
return GS_UNHANDLED;
|
||||
}
|
||||
--- gcc/testsuite/gcc.c-torture/execute/20071029-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/20071029-1.c (revision 129743)
|
||||
@@ -0,0 +1,56 @@
|
||||
+extern void exit (int);
|
||||
+extern void abort (void);
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct
|
||||
+ {
|
||||
+ int f1, f2, f3, f4, f5, f6, f7, f8;
|
||||
+ long int f9, f10;
|
||||
+ int f11;
|
||||
+ } f;
|
||||
+ char s[56];
|
||||
+ long int a;
|
||||
+} T;
|
||||
+
|
||||
+__attribute__((noinline))
|
||||
+void
|
||||
+test (T *t)
|
||||
+{
|
||||
+ static int i = 11;
|
||||
+ if (t->f.f1 != i++)
|
||||
+ abort ();
|
||||
+ if (t->f.f2 || t->f.f3 || t->f.f4 || t->f.f5 || t->f.f6
|
||||
+ || t->f.f7 || t->f.f8 || t->f.f9 || t->f.f10 || t->f.f11)
|
||||
+ abort ();
|
||||
+ if (i == 20)
|
||||
+ exit (0);
|
||||
+}
|
||||
+
|
||||
+__attribute__((noinline))
|
||||
+void
|
||||
+foo (int i)
|
||||
+{
|
||||
+ T t;
|
||||
+again:
|
||||
+ t = (T) { { ++i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+ goto again;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ T *t1, *t2;
|
||||
+ int cnt = 0;
|
||||
+ t1 = (T *) 0;
|
||||
+loop:
|
||||
+ t2 = t1;
|
||||
+ t1 = & (T) { .f.f9 = cnt++ };
|
||||
+ if (cnt < 3)
|
||||
+ goto loop;
|
||||
+ if (t1 != t2 || t1->f.f9 != 2)
|
||||
+ abort ();
|
||||
+ foo (10);
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr33723.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr33723.c (revision 129743)
|
||||
@@ -0,0 +1,72 @@
|
||||
+/* PR tree-optimization/33723 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-gimple" } */
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct
|
||||
+ {
|
||||
+ int f1, f2, f3, f4, f5, f6, f7, f8;
|
||||
+ long int f9, f10;
|
||||
+ int f11;
|
||||
+ } f;
|
||||
+ char s[4];
|
||||
+ long int a;
|
||||
+} T;
|
||||
+
|
||||
+void
|
||||
+foo1 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar1 (void)
|
||||
+{
|
||||
+ T t = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz1 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (const T) { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+foo2 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar2 (void)
|
||||
+{
|
||||
+ T t = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz2 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (const T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz3 (void)
|
||||
+{
|
||||
+ T t;
|
||||
+ t = (const T) (T) { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "gimple" } } */
|
@ -1,67 +0,0 @@
|
||||
2007-10-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33744
|
||||
* parser.c (cp_parser_parenthesized_expression_list): Set
|
||||
greater_than_is_operator_p to true in between the parens.
|
||||
|
||||
* g++.dg/template/arg6.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c.jj 2007-10-12 00:28:24.000000000 +0200
|
||||
+++ gcc/cp/parser.c 2007-10-15 14:52:02.000000000 +0200
|
||||
@@ -4976,6 +4976,7 @@ cp_parser_parenthesized_expression_list
|
||||
tree expression_list = NULL_TREE;
|
||||
bool fold_expr_p = is_attribute_list;
|
||||
tree identifier = NULL_TREE;
|
||||
+ bool saved_greater_than_is_operator_p;
|
||||
|
||||
/* Assume all the expressions will be constant. */
|
||||
if (non_constant_p)
|
||||
@@ -4984,6 +4985,12 @@ cp_parser_parenthesized_expression_list
|
||||
if (!cp_parser_require (parser, CPP_OPEN_PAREN, "`('"))
|
||||
return error_mark_node;
|
||||
|
||||
+ /* Within a parenthesized expression, a `>' token is always
|
||||
+ the greater-than operator. */
|
||||
+ saved_greater_than_is_operator_p
|
||||
+ = parser->greater_than_is_operator_p;
|
||||
+ parser->greater_than_is_operator_p = true;
|
||||
+
|
||||
/* Consume expressions until there are no more. */
|
||||
if (cp_lexer_next_token_is_not (parser->lexer, CPP_CLOSE_PAREN))
|
||||
while (true)
|
||||
@@ -5069,9 +5076,16 @@ cp_parser_parenthesized_expression_list
|
||||
if (ending < 0)
|
||||
goto get_comma;
|
||||
if (!ending)
|
||||
- return error_mark_node;
|
||||
+ {
|
||||
+ parser->greater_than_is_operator_p
|
||||
+ = saved_greater_than_is_operator_p;
|
||||
+ return error_mark_node;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ parser->greater_than_is_operator_p
|
||||
+ = saved_greater_than_is_operator_p;
|
||||
+
|
||||
/* We built up the list in reverse order so we must reverse it now. */
|
||||
expression_list = nreverse (expression_list);
|
||||
if (identifier)
|
||||
--- gcc/testsuite/g++.dg/template/arg6.C.jj 2007-10-15 14:59:13.000000000 +0200
|
||||
+++ gcc/testsuite/g++.dg/template/arg6.C 2007-10-15 14:57:31.000000000 +0200
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/33744
|
||||
+// { dg-do run }
|
||||
+
|
||||
+template <bool B> struct A { bool b; A() : b(B) {}; };
|
||||
+A<bool(1)> a;
|
||||
+A<bool(1<2)> b;
|
||||
+A<(bool)(2>1)> c;
|
||||
+A<bool((2>1))> d;
|
||||
+A<bool(2>1)> e;
|
||||
+
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+ return (a.b && b.b && c.b && d.b && e.b) ? 0 : 1;
|
||||
+}
|
51
gcc41-pr33836.patch
Normal file
51
gcc41-pr33836.patch
Normal file
@ -0,0 +1,51 @@
|
||||
2007-11-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33836
|
||||
* parser.c (cp_parser_unary_expression): For &&label call
|
||||
cp_parser_non_integral_constant_expression and return error_mark_node
|
||||
if it returned true.
|
||||
|
||||
* g++.dg/ext/label10.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 129895)
|
||||
+++ gcc/cp/parser.c (revision 129896)
|
||||
@@ -5329,13 +5329,18 @@ cp_parser_unary_expression (cp_parser *p
|
||||
&& token->type == CPP_AND_AND)
|
||||
{
|
||||
tree identifier;
|
||||
+ tree expression;
|
||||
|
||||
/* Consume the '&&' token. */
|
||||
cp_lexer_consume_token (parser->lexer);
|
||||
/* Look for the identifier. */
|
||||
identifier = cp_parser_identifier (parser);
|
||||
/* Create an expression representing the address. */
|
||||
- return finish_label_address_expr (identifier);
|
||||
+ expression = finish_label_address_expr (identifier);
|
||||
+ if (cp_parser_non_integral_constant_expression (parser,
|
||||
+ "the address of a label"))
|
||||
+ expression = error_mark_node;
|
||||
+ return expression;
|
||||
}
|
||||
}
|
||||
if (unary_operator != ERROR_MARK)
|
||||
--- gcc/testsuite/g++.dg/ext/label10.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/label10.C (revision 129896)
|
||||
@@ -0,0 +1,17 @@
|
||||
+// PR c++/33836
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "-std=gnu++98" }
|
||||
+
|
||||
+template<int N> struct A
|
||||
+{
|
||||
+ enum { M = && N }; // { dg-error "referenced outside|cannot appear in" }
|
||||
+};
|
||||
+
|
||||
+A<0> a;
|
||||
+
|
||||
+void foo ()
|
||||
+{
|
||||
+ __label__ P;
|
||||
+ enum { O = && P }; // { dg-error "cannot appear in" }
|
||||
+ P:;
|
||||
+}
|
130
gcc41-pr33842.patch
Normal file
130
gcc41-pr33842.patch
Normal file
@ -0,0 +1,130 @@
|
||||
2007-10-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33842
|
||||
* cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
|
||||
* cxx-pretty-print.c (pp_cxx_primary_expression): Handle
|
||||
OFFSETOF_EXPR.
|
||||
(pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
|
||||
functions.
|
||||
* error.c (dump_expr): Handle OFFSETOF_EXPR.
|
||||
|
||||
* g++.dg/template/error34.C: New test.
|
||||
|
||||
--- gcc/cp/error.c (revision 129676)
|
||||
+++ gcc/cp/error.c (revision 129677)
|
||||
@@ -1887,6 +1887,10 @@ dump_expr (tree t, int flags)
|
||||
dump_expr (TREE_OPERAND (t, 0), flags);
|
||||
break;
|
||||
|
||||
+ case OFFSETOF_EXPR:
|
||||
+ pp_cxx_offsetof_expression (cxx_pp, t);
|
||||
+ break;
|
||||
+
|
||||
/* This list is incomplete, but should suffice for now.
|
||||
It is very important that `sorry' does not call
|
||||
`report_error_function'. That could cause an infinite loop. */
|
||||
--- gcc/cp/cxx-pretty-print.c (revision 129676)
|
||||
+++ gcc/cp/cxx-pretty-print.c (revision 129677)
|
||||
@@ -356,6 +356,10 @@ pp_cxx_primary_expression (cxx_pretty_pr
|
||||
pp_cxx_right_paren (pp);
|
||||
break;
|
||||
|
||||
+ case OFFSETOF_EXPR:
|
||||
+ pp_cxx_offsetof_expression (pp, t);
|
||||
+ break;
|
||||
+
|
||||
default:
|
||||
pp_c_primary_expression (pp_c_base (pp), t);
|
||||
break;
|
||||
@@ -1944,6 +1948,49 @@ typedef c_pretty_print_fn pp_fun;
|
||||
|
||||
/* Initialization of a C++ pretty-printer object. */
|
||||
|
||||
+static bool
|
||||
+pp_cxx_offsetof_expression_1 (cxx_pretty_printer *pp, tree t)
|
||||
+{
|
||||
+ switch (TREE_CODE (t))
|
||||
+ {
|
||||
+ case ARROW_EXPR:
|
||||
+ if (TREE_CODE (TREE_OPERAND (t, 0)) == STATIC_CAST_EXPR
|
||||
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0))))
|
||||
+ {
|
||||
+ pp_cxx_type_id (pp, TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0))));
|
||||
+ pp_cxx_separate_with (pp, ',');
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ case COMPONENT_REF:
|
||||
+ if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0)))
|
||||
+ return false;
|
||||
+ if (TREE_CODE (TREE_OPERAND (t, 0)) != ARROW_EXPR)
|
||||
+ pp_cxx_dot (pp);
|
||||
+ pp_cxx_expression (pp, TREE_OPERAND (t, 1));
|
||||
+ return true;
|
||||
+ case ARRAY_REF:
|
||||
+ if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0)))
|
||||
+ return false;
|
||||
+ pp_left_bracket (pp);
|
||||
+ pp_cxx_expression (pp, TREE_OPERAND (t, 1));
|
||||
+ pp_right_bracket (pp);
|
||||
+ return true;
|
||||
+ default:
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+pp_cxx_offsetof_expression (cxx_pretty_printer *pp, tree t)
|
||||
+{
|
||||
+ pp_cxx_identifier (pp, "offsetof");
|
||||
+ pp_cxx_left_paren (pp);
|
||||
+ if (!pp_cxx_offsetof_expression_1 (pp, TREE_OPERAND (t, 0)))
|
||||
+ pp_cxx_expression (pp, TREE_OPERAND (t, 0));
|
||||
+ pp_cxx_right_paren (pp);
|
||||
+}
|
||||
+
|
||||
void
|
||||
pp_cxx_pretty_printer_init (cxx_pretty_printer *pp)
|
||||
{
|
||||
--- gcc/cp/cxx-pretty-print.h (revision 129676)
|
||||
+++ gcc/cp/cxx-pretty-print.h (revision 129677)
|
||||
@@ -70,6 +70,6 @@ void pp_cxx_separate_with (cxx_pretty_pr
|
||||
|
||||
void pp_cxx_declaration (cxx_pretty_printer *, tree);
|
||||
void pp_cxx_canonical_template_parameter (cxx_pretty_printer *, tree);
|
||||
-
|
||||
+void pp_cxx_offsetof_expression (cxx_pretty_printer *, tree);
|
||||
|
||||
#endif /* GCC_CXX_PRETTY_PRINT_H */
|
||||
--- gcc/testsuite/g++.dg/template/error34.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/error34.C (revision 129677)
|
||||
@@ -0,0 +1,29 @@
|
||||
+// PR c++/33842
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template<typename T> struct A
|
||||
+{
|
||||
+ A<__builtin_offsetof(T, x)>(); // { dg-error "type/value mismatch|offsetof\\(T, x\\)" }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct B
|
||||
+{
|
||||
+ B<__builtin_offsetof(T, x.y)>(); // { dg-error "type/value mismatch|offsetof\\(T, x.y\\)" }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct C
|
||||
+{
|
||||
+ C<__builtin_offsetof(T, x[6])>(); // { dg-error "type/value mismatch|offsetof\\(T, x\\\[6\\\]\\)" }
|
||||
+};
|
||||
+
|
||||
+template<typename T> struct D
|
||||
+{
|
||||
+ D<__builtin_offsetof(T, x.y[6].z)>(); // { dg-error "type/value mismatch|offsetof\\(T, x.y\\\[6\\\].z\\)" }
|
||||
+};
|
||||
+
|
||||
+struct E { int x; };
|
||||
+
|
||||
+template<typename T> struct F
|
||||
+{
|
||||
+ F<__builtin_offsetof(E, x)>(); // { dg-error "type/value mismatch|offsetof\\(E, x\\)" }
|
||||
+};
|
56
gcc41-pr33844.patch
Normal file
56
gcc41-pr33844.patch
Normal file
@ -0,0 +1,56 @@
|
||||
2007-10-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33844
|
||||
* cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
|
||||
->* rather than .*.
|
||||
* error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
|
||||
|
||||
* g++.dg/other/ptrmem8.C: New test.
|
||||
|
||||
--- gcc/cp/error.c (revision 129681)
|
||||
+++ gcc/cp/error.c (revision 129682)
|
||||
@@ -1891,6 +1891,11 @@ dump_expr (tree t, int flags)
|
||||
pp_cxx_offsetof_expression (cxx_pp, t);
|
||||
break;
|
||||
|
||||
+ case MEMBER_REF:
|
||||
+ case DOTSTAR_EXPR:
|
||||
+ pp_multiplicative_expression (cxx_pp, t);
|
||||
+ break;
|
||||
+
|
||||
/* This list is incomplete, but should suffice for now.
|
||||
It is very important that `sorry' does not call
|
||||
`report_error_function'. That could cause an infinite loop. */
|
||||
--- gcc/cp/cxx-pretty-print.c (revision 129681)
|
||||
+++ gcc/cp/cxx-pretty-print.c (revision 129682)
|
||||
@@ -814,7 +814,10 @@ pp_cxx_pm_expression (cxx_pretty_printer
|
||||
case MEMBER_REF:
|
||||
case DOTSTAR_EXPR:
|
||||
pp_cxx_pm_expression (pp, TREE_OPERAND (t, 0));
|
||||
- pp_cxx_dot (pp);
|
||||
+ if (TREE_CODE (t) == MEMBER_REF)
|
||||
+ pp_cxx_arrow (pp);
|
||||
+ else
|
||||
+ pp_cxx_dot (pp);
|
||||
pp_star(pp);
|
||||
pp_cxx_cast_expression (pp, TREE_OPERAND (t, 1));
|
||||
break;
|
||||
--- gcc/testsuite/g++.dg/other/ptrmem8.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/other/ptrmem8.C (revision 129682)
|
||||
@@ -0,0 +1,16 @@
|
||||
+// PR c++/33844
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+struct A {};
|
||||
+
|
||||
+template<int> void foo(void (A::* f)())
|
||||
+{
|
||||
+ A a;
|
||||
+ &(a.*f); // { dg-error "invalid use of\[^\n\]*\\.\\*\[^\n\]*to form|qualified-id is required" }
|
||||
+}
|
||||
+
|
||||
+template<int> void bar(void (A::* f)())
|
||||
+{
|
||||
+ A *p;
|
||||
+ &(p->*f); // { dg-error "invalid use of\[^\n\]*->\\*\[^\n\]*to form|qualified-id is required" }
|
||||
+}
|
39
gcc41-pr33962.patch
Normal file
39
gcc41-pr33962.patch
Normal file
@ -0,0 +1,39 @@
|
||||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/33962
|
||||
* pt.c (more_specialized_fn): Don't segfault if one or
|
||||
both argument list end with ellipsis.
|
||||
|
||||
* g++.dg/overload/template3.C: New test.
|
||||
|
||||
--- gcc/cp/pt.c (revision 130307)
|
||||
+++ gcc/cp/pt.c (revision 130308)
|
||||
@@ -13523,6 +13523,10 @@ more_specialized_fn (tree pat1, tree pat
|
||||
|
||||
args1 = TREE_CHAIN (args1);
|
||||
args2 = TREE_CHAIN (args2);
|
||||
+
|
||||
+ /* Stop when an ellipsis is seen. */
|
||||
+ if (args1 == NULL_TREE || args2 == NULL_TREE)
|
||||
+ break;
|
||||
}
|
||||
|
||||
processing_template_decl--;
|
||||
--- gcc/testsuite/g++.dg/overload/template3.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/overload/template3.C (revision 130308)
|
||||
@@ -0,0 +1,15 @@
|
||||
+// PR c++/33962
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+template <class T> struct A;
|
||||
+
|
||||
+template <class U> void foo (const U &x, ...);
|
||||
+template <class T> void foo (const A<T> &x, ...);
|
||||
+
|
||||
+void bar (const A<int> &x, const char *y)
|
||||
+{
|
||||
+ foo (x, y);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-assembler "_Z3fooIiEvRK1AIT_Ez" } } */
|
||||
+/* { dg-final { scan-assembler-not "_Z3fooI1AIiEEvRKT_z" } } */
|
62
gcc41-pr34070.patch
Normal file
62
gcc41-pr34070.patch
Normal file
@ -0,0 +1,62 @@
|
||||
2007-11-12 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34070
|
||||
* fold-const.c (fold_binary): If testing for non-negative
|
||||
operands with tree_expr_nonnegative_warnv_p make sure to
|
||||
use op0 which has all (sign) conversions retained.
|
||||
|
||||
* gcc.c-torture/execute/pr34070-1.c: New testcase.
|
||||
* gcc.c-torture/execute/pr34070-2.c: Likewise.
|
||||
|
||||
--- gcc/fold-const.c (revision 130097)
|
||||
+++ gcc/fold-const.c (revision 130098)
|
||||
@@ -8509,7 +8509,7 @@ fold_binary (enum tree_code code, tree t
|
||||
/* Simplify A / (B << N) where A and B are positive and B is
|
||||
a power of 2, to A >> (N + log2(B)). */
|
||||
if (TREE_CODE (arg1) == LSHIFT_EXPR
|
||||
- && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0)))
|
||||
+ && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (op0)))
|
||||
{
|
||||
tree sval = TREE_OPERAND (arg1, 0);
|
||||
if (integer_pow2p (sval) && tree_int_cst_sgn (sval) > 0)
|
||||
@@ -8584,7 +8584,7 @@ fold_binary (enum tree_code code, tree t
|
||||
/* Optimize TRUNC_MOD_EXPR by a power of two into a BIT_AND_EXPR,
|
||||
i.e. "X % C" into "X & (C - 1)", if X and C are positive. */
|
||||
if ((code == TRUNC_MOD_EXPR || code == FLOOR_MOD_EXPR)
|
||||
- && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (arg0)))
|
||||
+ && (TYPE_UNSIGNED (type) || tree_expr_nonnegative_p (op0)))
|
||||
{
|
||||
tree c = arg1;
|
||||
/* Also optimize A % (C << N) where C is a power of 2,
|
||||
--- gcc/testsuite/gcc.c-torture/execute/pr34070-1.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/pr34070-1.c (revision 130098)
|
||||
@@ -0,0 +1,13 @@
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int f(unsigned int x)
|
||||
+{
|
||||
+ return ((int)x) % 4;
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ if (f(-1) != -1)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
||||
--- gcc/testsuite/gcc.c-torture/execute/pr34070-2.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/pr34070-2.c (revision 130098)
|
||||
@@ -0,0 +1,13 @@
|
||||
+extern void abort (void);
|
||||
+
|
||||
+int f(unsigned int x, int n)
|
||||
+{
|
||||
+ return ((int)x) / (1 << n);
|
||||
+}
|
||||
+
|
||||
+int main()
|
||||
+{
|
||||
+ if (f(-1, 1) != 0)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
39
gcc41-pr34089.patch
Normal file
39
gcc41-pr34089.patch
Normal file
@ -0,0 +1,39 @@
|
||||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34089
|
||||
* parser.c (cp_parser_class_head): Reject function template ids.
|
||||
|
||||
* g++.dg/template/crash74.C: New test.
|
||||
|
||||
--- gcc/cp/parser.c (revision 130315)
|
||||
+++ gcc/cp/parser.c (revision 130316)
|
||||
@@ -14536,8 +14536,18 @@ cp_parser_class_head (cp_parser* parser,
|
||||
/* Look up the type. */
|
||||
if (template_id_p)
|
||||
{
|
||||
- type = TREE_TYPE (id);
|
||||
- type = maybe_process_partial_specialization (type);
|
||||
+ if (TREE_CODE (id) == TEMPLATE_ID_EXPR
|
||||
+ && (DECL_FUNCTION_TEMPLATE_P (TREE_OPERAND (id, 0))
|
||||
+ || TREE_CODE (TREE_OPERAND (id, 0)) == OVERLOAD))
|
||||
+ {
|
||||
+ error ("function template %qD redeclared as a class template", id);
|
||||
+ type = error_mark_node;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ type = TREE_TYPE (id);
|
||||
+ type = maybe_process_partial_specialization (type);
|
||||
+ }
|
||||
if (nested_name_specifier)
|
||||
pushed_scope = push_scope (nested_name_specifier);
|
||||
}
|
||||
--- gcc/testsuite/g++.dg/template/crash74.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/template/crash74.C (revision 130316)
|
||||
@@ -0,0 +1,6 @@
|
||||
+// PR c++/34089
|
||||
+// { dg-do compile }
|
||||
+// { dg-options "" }
|
||||
+
|
||||
+template<typename F> void foo () { }
|
||||
+template<typename F> struct foo<F> { }; // { dg-error "redeclared as" }
|
60
gcc41-pr34094.patch
Normal file
60
gcc41-pr34094.patch
Normal file
@ -0,0 +1,60 @@
|
||||
2007-11-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/34094
|
||||
* decl2.c (cp_write_global_declarations): Issue error about static
|
||||
data members in anonymous namespace which are declared and used,
|
||||
but not defined.
|
||||
|
||||
* g++.dg/ext/visibility/anon7.C: New test.
|
||||
|
||||
--- gcc/cp/decl2.c (revision 130350)
|
||||
+++ gcc/cp/decl2.c (revision 130351)
|
||||
@@ -3365,7 +3365,21 @@ cp_write_global_declarations (void)
|
||||
/* If this static data member is needed, provide it to the
|
||||
back end. */
|
||||
if (DECL_NOT_REALLY_EXTERN (decl) && decl_needed_p (decl))
|
||||
- DECL_EXTERNAL (decl) = 0;
|
||||
+ {
|
||||
+ /* Error on
|
||||
+ namespace { struct A { static int i; }; }
|
||||
+ int foo () { return A::i; }
|
||||
+ without A::i definition (which can't be defined in
|
||||
+ a different CU because of the anonymous namespace).
|
||||
+ Don't do this if DECL_INITIAL is set, because for
|
||||
+ namespace { struct A { static const int i = 4; } };
|
||||
+ decl_needed_p won't reliably detect whether it was
|
||||
+ really needed. */
|
||||
+ if (DECL_IN_AGGR_P (decl) && DECL_INITIAL (decl) == NULL_TREE)
|
||||
+ error ("%Jstatic data member %qD used, but not defined",
|
||||
+ decl, decl);
|
||||
+ DECL_EXTERNAL (decl) = 0;
|
||||
+ }
|
||||
}
|
||||
if (VEC_length (tree, pending_statics) != 0
|
||||
&& wrapup_global_declarations (VEC_address (tree, pending_statics),
|
||||
--- gcc/testsuite/g++.dg/ext/visibility/anon7.C (revision 0)
|
||||
+++ gcc/testsuite/g++.dg/ext/visibility/anon7.C (revision 130351)
|
||||
@@ -0,0 +1,23 @@
|
||||
+// PR c++/34094
|
||||
+// { dg-do compile }
|
||||
+
|
||||
+namespace
|
||||
+{
|
||||
+ struct A {
|
||||
+ static int bar ();
|
||||
+ static int i; // { dg-error "used, but not defined" }
|
||||
+ static int j;
|
||||
+ static int k;
|
||||
+ static int l;
|
||||
+ static const int m = 16;
|
||||
+ static const int n = 17;
|
||||
+ };
|
||||
+ int A::j = 4;
|
||||
+ int A::k;
|
||||
+ const int A::m;
|
||||
+}
|
||||
+
|
||||
+int foo (void)
|
||||
+{
|
||||
+ return A::i + A::j + A::k + A::m + A::n + A::bar ();
|
||||
+}
|
35
gcc41-pr34130.patch
Normal file
35
gcc41-pr34130.patch
Normal file
@ -0,0 +1,35 @@
|
||||
2007-11-17 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34130
|
||||
* fold-const.c (extract_muldiv_1): Do not move negative
|
||||
constants inside ABS_EXPR.
|
||||
|
||||
* gcc.c-torture/execute/pr34130.c: New testcase.
|
||||
|
||||
--- gcc/fold-const.c (revision 130257)
|
||||
+++ gcc/fold-const.c (revision 130258)
|
||||
@@ -6095,6 +6095,9 @@ extract_muldiv_1 (tree t, tree c, enum t
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ /* If the constant is negative, we cannot simplify this. */
|
||||
+ if (tree_int_cst_sgn (c) == -1)
|
||||
+ break;
|
||||
/* FALLTHROUGH */
|
||||
case NEGATE_EXPR:
|
||||
if ((t1 = extract_muldiv (op0, c, code, wide_type, strict_overflow_p))
|
||||
--- gcc/testsuite/gcc.c-torture/execute/pr34130.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.c-torture/execute/pr34130.c (revision 130258)
|
||||
@@ -0,0 +1,12 @@
|
||||
+extern void abort (void);
|
||||
+int foo (int i)
|
||||
+{
|
||||
+ return -2 * __builtin_abs(i - 2);
|
||||
+}
|
||||
+int main()
|
||||
+{
|
||||
+ if (foo(1) != -2
|
||||
+ || foo(3) != -2)
|
||||
+ abort ();
|
||||
+ return 0;
|
||||
+}
|
133
gcc41-pr34146.patch
Normal file
133
gcc41-pr34146.patch
Normal file
@ -0,0 +1,133 @@
|
||||
2007-11-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/34146
|
||||
* c-gimplify.c (optimize_compound_literals_in_ctor): New function.
|
||||
(c_gimplify_expr): Use it.
|
||||
|
||||
* gcc.dg/tree-ssa/pr34146.c: New test.
|
||||
|
||||
--- gcc/c-gimplify.c (revision 130310)
|
||||
+++ gcc/c-gimplify.c (revision 130311)
|
||||
@@ -208,6 +208,47 @@ gimplify_compound_literal_expr (tree *ex
|
||||
return GS_OK;
|
||||
}
|
||||
|
||||
+/* Optimize embedded COMPOUND_LITERAL_EXPRs within a CONSTRUCTOR,
|
||||
+ return a new CONSTRUCTOR if something changed. */
|
||||
+
|
||||
+static tree
|
||||
+optimize_compound_literals_in_ctor (tree orig_ctor)
|
||||
+{
|
||||
+ tree ctor = orig_ctor;
|
||||
+ VEC(constructor_elt,gc) *elts = CONSTRUCTOR_ELTS (ctor);
|
||||
+ unsigned int idx, num = VEC_length (constructor_elt, elts);
|
||||
+
|
||||
+ for (idx = 0; idx < num; idx++)
|
||||
+ {
|
||||
+ tree value = VEC_index (constructor_elt, elts, idx)->value;
|
||||
+ tree newval = value;
|
||||
+ if (TREE_CODE (value) == CONSTRUCTOR)
|
||||
+ newval = optimize_compound_literals_in_ctor (value);
|
||||
+ else if (TREE_CODE (value) == COMPOUND_LITERAL_EXPR)
|
||||
+ {
|
||||
+ tree decl_s = COMPOUND_LITERAL_EXPR_DECL_STMT (value);
|
||||
+ tree decl = DECL_EXPR_DECL (decl_s);
|
||||
+ tree init = DECL_INITIAL (decl);
|
||||
+
|
||||
+ if (!TREE_ADDRESSABLE (value)
|
||||
+ && !TREE_ADDRESSABLE (decl)
|
||||
+ && init)
|
||||
+ newval = init;
|
||||
+ }
|
||||
+ if (newval == value)
|
||||
+ continue;
|
||||
+
|
||||
+ if (ctor == orig_ctor)
|
||||
+ {
|
||||
+ ctor = copy_node (orig_ctor);
|
||||
+ CONSTRUCTOR_ELTS (ctor) = VEC_copy (constructor_elt, gc, elts);
|
||||
+ elts = CONSTRUCTOR_ELTS (ctor);
|
||||
+ }
|
||||
+ VEC_index (constructor_elt, elts, idx)->value = newval;
|
||||
+ }
|
||||
+ return ctor;
|
||||
+}
|
||||
+
|
||||
/* Do C-specific gimplification. Args are as for gimplify_expr. */
|
||||
|
||||
int
|
||||
@@ -254,6 +295,18 @@ c_gimplify_expr (tree *expr_p, tree *pre
|
||||
return GS_OK;
|
||||
}
|
||||
}
|
||||
+ else if (TREE_CODE (TREE_OPERAND (*expr_p, 1)) == CONSTRUCTOR)
|
||||
+ {
|
||||
+ tree ctor
|
||||
+ = optimize_compound_literals_in_ctor (TREE_OPERAND (*expr_p, 1));
|
||||
+
|
||||
+ if (ctor != TREE_OPERAND (*expr_p, 1))
|
||||
+ {
|
||||
+ *expr_p = copy_node (*expr_p);
|
||||
+ TREE_OPERAND (*expr_p, 1) = ctor;
|
||||
+ return GS_OK;
|
||||
+ }
|
||||
+ }
|
||||
return GS_UNHANDLED;
|
||||
|
||||
default:
|
||||
--- gcc/testsuite/gcc.dg/tree-ssa/pr34146.c (revision 0)
|
||||
+++ gcc/testsuite/gcc.dg/tree-ssa/pr34146.c (revision 130311)
|
||||
@@ -0,0 +1,53 @@
|
||||
+/* PR c/34146 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-O2 -fdump-tree-gimple" } */
|
||||
+
|
||||
+struct A
|
||||
+{
|
||||
+ int f1, f2, f3;
|
||||
+};
|
||||
+
|
||||
+struct B
|
||||
+{
|
||||
+ struct A g1, g2;
|
||||
+};
|
||||
+
|
||||
+struct C
|
||||
+{
|
||||
+ struct B h1, h2;
|
||||
+};
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct C c;
|
||||
+ char s[4];
|
||||
+ long int a;
|
||||
+} T;
|
||||
+
|
||||
+void
|
||||
+foo (void)
|
||||
+{
|
||||
+ T t = { { { { 0, 0, 0 }, { 0, 0, 0 } }, { { 0, 0, 0 }, { 0, 0, 0 } } } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+bar (void)
|
||||
+{
|
||||
+ T t = { { { { 0, 0, 0 }, (struct A) { 0, 0, 0 } },
|
||||
+ (struct B) { (struct A) { 0, 0, 0 }, { 0, 0, 0 } } } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+baz (void)
|
||||
+{
|
||||
+ T t = { { { { 0, 0, 0 }, (struct A) { 1, 1, 1 } },
|
||||
+ (struct B) { (struct A) { 0, 0, 0 }, { 1, 1, 1 } } } };
|
||||
+ test (&t);
|
||||
+}
|
||||
+
|
||||
+/* { dg-final { scan-tree-dump-not "t = D" "gimple"} } */
|
||||
+/* { dg-final { scan-tree-dump-not "t\.c\.h\[12\] = D" "gimple"} } */
|
||||
+/* { dg-final { scan-tree-dump-not "\.g\[12\] = D" "gimple"} } */
|
||||
+/* { dg-final { cleanup-tree-dump "gimple" } } */
|
28
gcc41-rh341221.patch
Normal file
28
gcc41-rh341221.patch
Normal file
@ -0,0 +1,28 @@
|
||||
2007-10-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* doc/Makefile.am (POD2MAN): Set date from cp-tools.texinfo
|
||||
timestamp rather than from current date.
|
||||
* doc/Makefile.in: Regenerated.
|
||||
|
||||
--- libjava/classpath/doc/Makefile.am.jj 2007-03-29 12:23:05.000000000 +0200
|
||||
+++ libjava/classpath/doc/Makefile.am 2007-10-21 13:23:17.000000000 +0200
|
||||
@@ -31,7 +31,7 @@ TOOLS_MANFILES = \
|
||||
BASEVER = $(top_srcdir)/../../gcc/BASE-VER
|
||||
DEVPHASE = $(top_srcdir)/../../gcc/DEV-PHASE
|
||||
|
||||
-POD2MAN = pod2man --center="GNU" --release="gcc-$(shell cat $(BASEVER))"
|
||||
+POD2MAN = pod2man --center="GNU" --release="gcc-$(shell cat $(BASEVER))" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
|
||||
TEXI2POD = perl $(top_srcdir)/../../contrib/texi2pod.pl
|
||||
STAMP = echo timestamp >
|
||||
|
||||
--- libjava/classpath/doc/Makefile.in.jj 2007-03-29 12:23:05.000000000 +0200
|
||||
+++ libjava/classpath/doc/Makefile.in 2007-10-21 13:24:00.000000000 +0200
|
||||
@@ -317,7 +317,7 @@ TOOLS_MANFILES = \
|
||||
|
||||
BASEVER = $(top_srcdir)/../../gcc/BASE-VER
|
||||
DEVPHASE = $(top_srcdir)/../../gcc/DEV-PHASE
|
||||
-POD2MAN = pod2man --center="GNU" --release="gcc-$(shell cat $(BASEVER))"
|
||||
+POD2MAN = pod2man --center="GNU" --release="gcc-$(shell cat $(BASEVER))" --date="$(shell ls --time-style=+%F -l $(srcdir)/cp-tools.texinfo | awk '{print $$6}')"
|
||||
TEXI2POD = perl $(top_srcdir)/../../contrib/texi2pod.pl
|
||||
STAMP = echo timestamp >
|
||||
all: all-recursive
|
676
gcc41-rh364001.patch
Normal file
676
gcc41-rh364001.patch
Normal file
@ -0,0 +1,676 @@
|
||||
2007-11-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/22244
|
||||
* langhooks-def.h (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.
|
||||
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add it.
|
||||
* langhooks.h (struct array_descr_info): Forward declaration.
|
||||
(struct lang_hooks_for_types): Add get_array_descr_info field.
|
||||
* dwarf2.h (DW_AT_bit_stride, DW_AT_byte_stride): New.
|
||||
(DW_AT_stride_size, DW_AT_stride): Keep around for Dwarf2
|
||||
compatibility.
|
||||
* dwarf2out.h (struct array_descr_info): New type.
|
||||
* dwarf2out.c (dwarf_attr_name): Rename DW_AT_stride to
|
||||
DW_AT_byte_stride and DW_AT_stride_size to DW_AT_bit_size.
|
||||
(descr_info_loc, add_descr_info_field, gen_descr_array_type_die):
|
||||
New functions.
|
||||
(gen_type_die_with_usage): Call lang_hooks.types.get_array_descr_info
|
||||
and gen_descr_array_type_die.
|
||||
|
||||
* trans.h (struct array_descr_info): Forward declaration.
|
||||
(gfc_get_array_descr_info): New prototype.
|
||||
(enum gfc_array_kind): New type.
|
||||
(struct lang_type): Add akind field.
|
||||
(GFC_TYPE_ARRAY_AKIND): Define.
|
||||
* trans-types.c: Include dwarf2out.h.
|
||||
(gfc_build_array_type): Add akind argument. Adjust
|
||||
gfc_get_array_type_bounds call.
|
||||
(gfc_get_nodesc_array_type): Include proper debug info even for
|
||||
assumed-size arrays.
|
||||
(gfc_get_array_type_bounds): Add akind argument, set
|
||||
GFC_TYPE_ARRAY_AKIND to it.
|
||||
(gfc_sym_type, gfc_get_derived_type): Adjust gfc_build_array_type
|
||||
callers.
|
||||
(gfc_get_array_descr_info): New function.
|
||||
* trans-array.c (gfc_trans_create_temp_array,
|
||||
gfc_conv_expr_descriptor): Adjust gfc_get_array_type_bounds
|
||||
callers.
|
||||
* trans-stmt.c (gfc_trans_pointer_assign_need_temp): Likewise.
|
||||
* trans-types.h (gfc_get_array_type_bounds): Adjust prototype.
|
||||
* Make-lang.in (fortran/trans-types.o): Depend on dwarf2out.h.
|
||||
* f95-lang.c (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.
|
||||
|
||||
--- gcc/fortran/trans.h.jj 2007-07-23 12:24:16.000000000 +0200
|
||||
+++ gcc/fortran/trans.h 2007-11-24 15:04:51.000000000 +0100
|
||||
@@ -453,6 +453,8 @@ tree getdecls (void);
|
||||
tree gfc_truthvalue_conversion (tree);
|
||||
tree builtin_function (const char *, tree, int, enum built_in_class,
|
||||
const char *, tree);
|
||||
+struct array_descr_info;
|
||||
+bool gfc_get_array_descr_info (tree, struct array_descr_info *);
|
||||
|
||||
/* In trans-openmp.c */
|
||||
bool gfc_omp_privatize_by_reference (tree);
|
||||
@@ -541,10 +543,19 @@ extern GTY(()) tree gfor_fndecl_sr_kind;
|
||||
|
||||
/* G95-specific declaration information. */
|
||||
|
||||
+enum gfc_array_kind
|
||||
+{
|
||||
+ GFC_ARRAY_UNKNOWN,
|
||||
+ GFC_ARRAY_ASSUMED_SHAPE,
|
||||
+ GFC_ARRAY_ALLOCATABLE,
|
||||
+ GFC_ARRAY_POINTER
|
||||
+};
|
||||
+
|
||||
/* Array types only. */
|
||||
struct lang_type GTY(())
|
||||
{
|
||||
int rank;
|
||||
+ enum gfc_array_kind akind;
|
||||
tree lbound[GFC_MAX_DIMENSIONS];
|
||||
tree ubound[GFC_MAX_DIMENSIONS];
|
||||
tree stride[GFC_MAX_DIMENSIONS];
|
||||
@@ -595,7 +606,8 @@ struct lang_decl GTY(())
|
||||
#define GFC_TYPE_ARRAY_RANK(node) (TYPE_LANG_SPECIFIC(node)->rank)
|
||||
#define GFC_TYPE_ARRAY_SIZE(node) (TYPE_LANG_SPECIFIC(node)->size)
|
||||
#define GFC_TYPE_ARRAY_OFFSET(node) (TYPE_LANG_SPECIFIC(node)->offset)
|
||||
-/* Code should use gfc_get_dtype instead of accesig this directly. It may
|
||||
+#define GFC_TYPE_ARRAY_AKIND(node) (TYPE_LANG_SPECIFIC(node)->akind)
|
||||
+/* Code should use gfc_get_dtype instead of accesing this directly. It may
|
||||
not be known when the type is created. */
|
||||
#define GFC_TYPE_ARRAY_DTYPE(node) (TYPE_LANG_SPECIFIC(node)->dtype)
|
||||
#define GFC_TYPE_ARRAY_DATAPTR_TYPE(node) \
|
||||
--- gcc/fortran/trans-stmt.c.jj 2007-03-12 08:28:15.000000000 +0100
|
||||
+++ gcc/fortran/trans-stmt.c 2007-11-24 14:58:20.000000000 +0100
|
||||
@@ -2313,7 +2313,8 @@ gfc_trans_pointer_assign_need_temp (gfc_
|
||||
/* Make a new descriptor. */
|
||||
parmtype = gfc_get_element_type (TREE_TYPE (desc));
|
||||
parmtype = gfc_get_array_type_bounds (parmtype, loop.dimen,
|
||||
- loop.from, loop.to, 1);
|
||||
+ loop.from, loop.to, 1,
|
||||
+ GFC_ARRAY_UNKNOWN);
|
||||
|
||||
/* Allocate temporary for nested forall construct. */
|
||||
tmp1 = allocate_temp_for_forall_nest (nested_forall_info, parmtype,
|
||||
--- gcc/fortran/f95-lang.c.jj 2007-02-20 22:38:20.000000000 +0100
|
||||
+++ gcc/fortran/f95-lang.c 2007-11-24 15:03:19.000000000 +0100
|
||||
@@ -124,6 +124,7 @@ static HOST_WIDE_INT gfc_get_alias_set (
|
||||
#undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR
|
||||
#undef LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE
|
||||
#undef LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES
|
||||
+#undef LANG_HOOKS_GET_ARRAY_DESCR_INFO
|
||||
|
||||
/* Define lang hooks. */
|
||||
#define LANG_HOOKS_NAME "GNU F95"
|
||||
@@ -150,6 +151,7 @@ static HOST_WIDE_INT gfc_get_alias_set (
|
||||
#define LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE gfc_omp_private_debug_clause
|
||||
#define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \
|
||||
gfc_omp_firstprivatize_type_sizes
|
||||
+#define LANG_HOOKS_GET_ARRAY_DESCR_INFO gfc_get_array_descr_info
|
||||
|
||||
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
|
||||
|
||||
--- gcc/fortran/Make-lang.in.jj 2007-09-25 11:32:17.000000000 +0200
|
||||
+++ gcc/fortran/Make-lang.in 2007-11-24 15:02:36.000000000 +0100
|
||||
@@ -292,7 +292,7 @@ fortran/trans-decl.o: $(GFORTRAN_TRANS_D
|
||||
cgraph.h $(TARGET_H) function.h $(FLAGS_H) $(RTL_H) tree-gimple.h \
|
||||
tree-dump.h
|
||||
fortran/trans-types.o: $(GFORTRAN_TRANS_DEPS) gt-fortran-trans-types.h \
|
||||
- real.h toplev.h $(TARGET_H) $(FLAGS_H)
|
||||
+ real.h toplev.h $(TARGET_H) $(FLAGS_H) dwarf2out.h
|
||||
fortran/trans-const.o: $(GFORTRAN_TRANS_DEPS)
|
||||
fortran/trans-expr.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
||||
fortran/trans-stmt.o: $(GFORTRAN_TRANS_DEPS) fortran/dependency.h
|
||||
--- gcc/fortran/trans-types.c.jj 2007-09-25 11:32:17.000000000 +0200
|
||||
+++ gcc/fortran/trans-types.c 2007-11-24 15:06:59.000000000 +0100
|
||||
@@ -36,6 +36,7 @@ Software Foundation, 51 Franklin Street,
|
||||
#include "trans-const.h"
|
||||
#include "real.h"
|
||||
#include "flags.h"
|
||||
+#include "dwarf2out.h"
|
||||
|
||||
|
||||
#if (GFC_MAX_DIMENSIONS < 10)
|
||||
@@ -821,7 +822,8 @@ gfc_is_nodesc_array (gfc_symbol * sym)
|
||||
/* Create an array descriptor type. */
|
||||
|
||||
static tree
|
||||
-gfc_build_array_type (tree type, gfc_array_spec * as)
|
||||
+gfc_build_array_type (tree type, gfc_array_spec * as,
|
||||
+ enum gfc_array_kind akind)
|
||||
{
|
||||
tree lbound[GFC_MAX_DIMENSIONS];
|
||||
tree ubound[GFC_MAX_DIMENSIONS];
|
||||
@@ -837,7 +839,9 @@ gfc_build_array_type (tree type, gfc_arr
|
||||
ubound[n] = gfc_conv_array_bound (as->upper[n]);
|
||||
}
|
||||
|
||||
- return gfc_get_array_type_bounds (type, as->rank, lbound, ubound, 0);
|
||||
+ if (as->type == AS_ASSUMED_SHAPE)
|
||||
+ akind = GFC_ARRAY_ASSUMED_SHAPE;
|
||||
+ return gfc_get_array_type_bounds (type, as->rank, lbound, ubound, 0, akind);
|
||||
}
|
||||
|
||||
/* Returns the struct descriptor_dimension type. */
|
||||
@@ -1015,7 +1019,7 @@ gfc_get_nodesc_array_type (tree etype, g
|
||||
if (expr->expr_type == EXPR_CONSTANT)
|
||||
{
|
||||
tmp = gfc_conv_mpz_to_tree (expr->value.integer,
|
||||
- gfc_index_integer_kind);
|
||||
+ gfc_index_integer_kind);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1107,7 +1111,7 @@ gfc_get_nodesc_array_type (tree etype, g
|
||||
/* In debug info represent packed arrays as multi-dimensional
|
||||
if they have rank > 1 and with proper bounds, instead of flat
|
||||
arrays. */
|
||||
- if (known_stride && write_symbols != NO_DEBUG)
|
||||
+ if (known_offset && write_symbols != NO_DEBUG)
|
||||
{
|
||||
tree gtype = etype, rtype, type_decl;
|
||||
|
||||
@@ -1193,7 +1197,8 @@ gfc_get_array_descriptor_base (int dimen
|
||||
|
||||
tree
|
||||
gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound,
|
||||
- tree * ubound, int packed)
|
||||
+ tree * ubound, int packed,
|
||||
+ enum gfc_array_kind akind)
|
||||
{
|
||||
char name[8 + GFC_RANK_DIGITS + GFC_MAX_SYMBOL_LEN];
|
||||
tree fat_type, base_type, arraytype, lower, upper, stride, tmp;
|
||||
@@ -1220,6 +1225,7 @@ gfc_get_array_type_bounds (tree etype, i
|
||||
|
||||
GFC_TYPE_ARRAY_RANK (fat_type) = dimen;
|
||||
GFC_TYPE_ARRAY_DTYPE (fat_type) = NULL_TREE;
|
||||
+ GFC_TYPE_ARRAY_AKIND (fat_type) = akind;
|
||||
|
||||
/* Build an array descriptor record type. */
|
||||
if (packed != 0)
|
||||
@@ -1337,7 +1343,14 @@ gfc_sym_type (gfc_symbol * sym)
|
||||
}
|
||||
}
|
||||
else
|
||||
- type = gfc_build_array_type (type, sym->as);
|
||||
+ {
|
||||
+ enum gfc_array_kind akind = GFC_ARRAY_UNKNOWN;
|
||||
+ if (sym->attr.pointer)
|
||||
+ akind = GFC_ARRAY_POINTER;
|
||||
+ else if (sym->attr.allocatable)
|
||||
+ akind = GFC_ARRAY_ALLOCATABLE;
|
||||
+ type = gfc_build_array_type (type, sym->as, akind);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1550,7 +1563,8 @@ gfc_get_derived_type (gfc_symbol * deriv
|
||||
{
|
||||
/* Pointers to arrays aren't actually pointer types. The
|
||||
descriptors are separate, but the data is common. */
|
||||
- field_type = gfc_build_array_type (field_type, c->as);
|
||||
+ field_type = gfc_build_array_type (field_type, c->as,
|
||||
+ GFC_ARRAY_POINTER);
|
||||
}
|
||||
else
|
||||
field_type = gfc_get_nodesc_array_type (field_type, c->as, 3);
|
||||
@@ -1893,4 +1907,124 @@ gfc_signed_type (tree type)
|
||||
return gfc_signed_or_unsigned_type (0, type);
|
||||
}
|
||||
|
||||
+/* Return TRUE if TYPE is a type with a hidden descriptor, fill in INFO
|
||||
+ in that case. */
|
||||
+
|
||||
+bool
|
||||
+gfc_get_array_descr_info (tree type, struct array_descr_info *info)
|
||||
+{
|
||||
+ int rank, dim;
|
||||
+ bool indirect = false;
|
||||
+ tree etype, ptype, field, t, base_decl;
|
||||
+ tree data_off, offset_off, dim_off, dim_size, elem_size;
|
||||
+ tree lower_suboff, upper_suboff, stride_suboff;
|
||||
+
|
||||
+ if (! GFC_DESCRIPTOR_TYPE_P (type))
|
||||
+ {
|
||||
+ if (! POINTER_TYPE_P (type))
|
||||
+ return false;
|
||||
+ type = TREE_TYPE (type);
|
||||
+ if (! GFC_DESCRIPTOR_TYPE_P (type))
|
||||
+ return false;
|
||||
+ indirect = true;
|
||||
+ }
|
||||
+
|
||||
+ rank = GFC_TYPE_ARRAY_RANK (type);
|
||||
+ if (rank >= (int) (sizeof (info->dimen) / sizeof (info->dimen[0])))
|
||||
+ return false;
|
||||
+
|
||||
+ etype = GFC_TYPE_ARRAY_DATAPTR_TYPE (type);
|
||||
+ gcc_assert (POINTER_TYPE_P (etype));
|
||||
+ etype = TREE_TYPE (etype);
|
||||
+ gcc_assert (TREE_CODE (etype) == ARRAY_TYPE);
|
||||
+ etype = TREE_TYPE (etype);
|
||||
+ /* Can't handle variable sized elements yet. */
|
||||
+ if (int_size_in_bytes (etype) <= 0)
|
||||
+ return false;
|
||||
+ /* Nor non-constant lower bounds in assumed shape arrays. */
|
||||
+ if (GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ASSUMED_SHAPE)
|
||||
+ {
|
||||
+ for (dim = 0; dim < rank; dim++)
|
||||
+ if (GFC_TYPE_ARRAY_LBOUND (type, dim) == NULL_TREE
|
||||
+ || TREE_CODE (GFC_TYPE_ARRAY_LBOUND (type, dim)) != INTEGER_CST)
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ memset (info, '\0', sizeof (*info));
|
||||
+ info->ndimensions = rank;
|
||||
+ info->element_type = etype;
|
||||
+ ptype = build_pointer_type (gfc_array_index_type);
|
||||
+ if (indirect)
|
||||
+ {
|
||||
+ info->base_decl = build_decl (VAR_DECL, NULL_TREE,
|
||||
+ build_pointer_type (ptype));
|
||||
+ base_decl = build1 (INDIRECT_REF, ptype, info->base_decl);
|
||||
+ }
|
||||
+ else
|
||||
+ info->base_decl = base_decl = build_decl (VAR_DECL, NULL_TREE, ptype);
|
||||
+
|
||||
+ elem_size = fold_convert (gfc_array_index_type, TYPE_SIZE_UNIT (etype));
|
||||
+ field = TYPE_FIELDS (TYPE_MAIN_VARIANT (type));
|
||||
+ data_off = byte_position (field);
|
||||
+ field = TREE_CHAIN (field);
|
||||
+ offset_off = byte_position (field);
|
||||
+ field = TREE_CHAIN (field);
|
||||
+ field = TREE_CHAIN (field);
|
||||
+ dim_off = byte_position (field);
|
||||
+ dim_size = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (field)));
|
||||
+ field = TYPE_FIELDS (TREE_TYPE (TREE_TYPE (field)));
|
||||
+ stride_suboff = byte_position (field);
|
||||
+ field = TREE_CHAIN (field);
|
||||
+ lower_suboff = byte_position (field);
|
||||
+ field = TREE_CHAIN (field);
|
||||
+ upper_suboff = byte_position (field);
|
||||
+
|
||||
+ t = base_decl;
|
||||
+ if (!integer_zerop (data_off))
|
||||
+ t = build2 (PLUS_EXPR, ptype, t, data_off);
|
||||
+ t = build1 (NOP_EXPR, build_pointer_type (ptr_type_node), t);
|
||||
+ info->data_location = build1 (INDIRECT_REF, ptr_type_node, t);
|
||||
+ if (GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ALLOCATABLE)
|
||||
+ info->allocated = build2 (NE_EXPR, boolean_type_node,
|
||||
+ info->data_location, null_pointer_node);
|
||||
+ else if (GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_POINTER)
|
||||
+ info->associated = build2 (NE_EXPR, boolean_type_node,
|
||||
+ info->data_location, null_pointer_node);
|
||||
+
|
||||
+ for (dim = 0; dim < rank; dim++)
|
||||
+ {
|
||||
+ t = build2 (PLUS_EXPR, ptype, base_decl,
|
||||
+ size_binop (PLUS_EXPR, dim_off, lower_suboff));
|
||||
+ t = build1 (INDIRECT_REF, gfc_array_index_type, t);
|
||||
+ info->dimen[dim].lower_bound = t;
|
||||
+ t = build2 (PLUS_EXPR, ptype, base_decl,
|
||||
+ size_binop (PLUS_EXPR, dim_off, upper_suboff));
|
||||
+ t = build1 (INDIRECT_REF, gfc_array_index_type, t);
|
||||
+ info->dimen[dim].upper_bound = t;
|
||||
+ if (GFC_TYPE_ARRAY_AKIND (type) == GFC_ARRAY_ASSUMED_SHAPE)
|
||||
+ {
|
||||
+ /* Assumed shape arrays have known lower bounds. */
|
||||
+ info->dimen[dim].upper_bound
|
||||
+ = build2 (MINUS_EXPR, gfc_array_index_type,
|
||||
+ info->dimen[dim].upper_bound,
|
||||
+ info->dimen[dim].lower_bound);
|
||||
+ info->dimen[dim].lower_bound
|
||||
+ = fold_convert (gfc_array_index_type,
|
||||
+ GFC_TYPE_ARRAY_LBOUND (type, dim));
|
||||
+ info->dimen[dim].upper_bound
|
||||
+ = build2 (PLUS_EXPR, gfc_array_index_type,
|
||||
+ info->dimen[dim].lower_bound,
|
||||
+ info->dimen[dim].upper_bound);
|
||||
+ }
|
||||
+ t = build2 (PLUS_EXPR, ptype, base_decl,
|
||||
+ size_binop (PLUS_EXPR, dim_off, stride_suboff));
|
||||
+ t = build1 (INDIRECT_REF, gfc_array_index_type, t);
|
||||
+ t = build2 (MULT_EXPR, gfc_array_index_type, t, elem_size);
|
||||
+ info->dimen[dim].stride = t;
|
||||
+ dim_off = size_binop (PLUS_EXPR, dim_off, dim_size);
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
#include "gt-fortran-trans-types.h"
|
||||
--- gcc/fortran/trans-array.c.jj 2007-04-03 13:10:00.000000000 +0200
|
||||
+++ gcc/fortran/trans-array.c 2007-11-24 14:58:20.000000000 +0100
|
||||
@@ -612,7 +612,8 @@ gfc_trans_allocate_temp_array (stmtblock
|
||||
|
||||
/* Initialize the descriptor. */
|
||||
type =
|
||||
- gfc_get_array_type_bounds (eltype, info->dimen, loop->from, loop->to, 1);
|
||||
+ gfc_get_array_type_bounds (eltype, info->dimen, loop->from, loop->to, 1,
|
||||
+ GFC_ARRAY_UNKNOWN);
|
||||
desc = gfc_create_var (type, "atmp");
|
||||
GFC_DECL_PACKED_ARRAY (desc) = 1;
|
||||
|
||||
@@ -4345,7 +4346,8 @@ gfc_conv_expr_descriptor (gfc_se * se, g
|
||||
/* Otherwise make a new one. */
|
||||
parmtype = gfc_get_element_type (TREE_TYPE (desc));
|
||||
parmtype = gfc_get_array_type_bounds (parmtype, loop.dimen,
|
||||
- loop.from, loop.to, 0);
|
||||
+ loop.from, loop.to, 0,
|
||||
+ GFC_ARRAY_UNKNOWN);
|
||||
parm = gfc_create_var (parmtype, "parm");
|
||||
}
|
||||
|
||||
--- gcc/fortran/trans-types.h.jj 2007-02-20 22:38:20.000000000 +0100
|
||||
+++ gcc/fortran/trans-types.h 2007-11-24 15:03:58.000000000 +0100
|
||||
@@ -79,7 +79,8 @@ tree gfc_signed_type (tree);
|
||||
tree gfc_signed_or_unsigned_type (int, tree);
|
||||
|
||||
tree gfc_get_element_type (tree);
|
||||
-tree gfc_get_array_type_bounds (tree, int, tree *, tree *, int);
|
||||
+tree gfc_get_array_type_bounds (tree, int, tree *, tree *, int,
|
||||
+ enum gfc_array_kind);
|
||||
tree gfc_get_nodesc_array_type (tree, gfc_array_spec *, int);
|
||||
|
||||
/* Add a field of given name and type to a UNION_TYPE or RECORD_TYPE. */
|
||||
--- gcc/dwarf2.h.jj 2007-02-20 22:39:12.000000000 +0100
|
||||
+++ gcc/dwarf2.h 2007-11-24 14:58:20.000000000 +0100
|
||||
@@ -275,7 +275,8 @@ enum dwarf_attribute
|
||||
DW_AT_prototyped = 0x27,
|
||||
DW_AT_return_addr = 0x2a,
|
||||
DW_AT_start_scope = 0x2c,
|
||||
- DW_AT_stride_size = 0x2e,
|
||||
+ DW_AT_bit_stride = 0x2e,
|
||||
+ DW_AT_stride_size = DW_AT_bit_stride,
|
||||
DW_AT_upper_bound = 0x2f,
|
||||
DW_AT_abstract_origin = 0x31,
|
||||
DW_AT_accessibility = 0x32,
|
||||
@@ -310,7 +311,8 @@ enum dwarf_attribute
|
||||
DW_AT_allocated = 0x4e,
|
||||
DW_AT_associated = 0x4f,
|
||||
DW_AT_data_location = 0x50,
|
||||
- DW_AT_stride = 0x51,
|
||||
+ DW_AT_byte_stride = 0x51,
|
||||
+ DW_AT_stride = DW_AT_byte_stride,
|
||||
DW_AT_entry_pc = 0x52,
|
||||
DW_AT_use_UTF8 = 0x53,
|
||||
DW_AT_extension = 0x54,
|
||||
--- gcc/langhooks.h.jj 2007-11-23 17:41:15.000000000 +0100
|
||||
+++ gcc/langhooks.h 2007-11-24 15:01:32.000000000 +0100
|
||||
@@ -28,6 +28,8 @@ struct diagnostic_info;
|
||||
|
||||
struct gimplify_omp_ctx;
|
||||
|
||||
+struct array_descr_info;
|
||||
+
|
||||
/* A print hook for print_tree (). */
|
||||
typedef void (*lang_print_tree_hook) (FILE *, tree, int indent);
|
||||
|
||||
@@ -153,6 +155,10 @@ struct lang_hooks_for_types
|
||||
Called only after doing all language independent checks. */
|
||||
bool (*type_hash_eq) (tree, tree);
|
||||
|
||||
+ /* Return TRUE if TYPE uses a hidden descriptor and fills in information
|
||||
+ for the debugger about the array bounds, strides, etc. */
|
||||
+ bool (*get_array_descr_info) (tree, struct array_descr_info *);
|
||||
+
|
||||
/* Nonzero if types that are identical are to be hashed so that only
|
||||
one copy is kept. If a language requires unique types for each
|
||||
user-specified type, such as Ada, this should be set to TRUE. */
|
||||
--- gcc/langhooks-def.h.jj 2007-11-23 17:41:15.000000000 +0100
|
||||
+++ gcc/langhooks-def.h 2007-11-24 15:00:47.000000000 +0100
|
||||
@@ -223,6 +223,7 @@ extern tree lhd_make_node (enum tree_cod
|
||||
#define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \
|
||||
lhd_omp_firstprivatize_type_sizes
|
||||
#define LANG_HOOKS_TYPE_HASH_EQ lhd_type_hash_eq
|
||||
+#define LANG_HOOKS_GET_ARRAY_DESCR_INFO NULL
|
||||
#define LANG_HOOKS_HASH_TYPES true
|
||||
|
||||
#define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
|
||||
@@ -238,6 +239,7 @@ extern tree lhd_make_node (enum tree_cod
|
||||
LANG_HOOKS_TYPE_MAX_SIZE, \
|
||||
LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES, \
|
||||
LANG_HOOKS_TYPE_HASH_EQ, \
|
||||
+ LANG_HOOKS_GET_ARRAY_DESCR_INFO, \
|
||||
LANG_HOOKS_HASH_TYPES \
|
||||
}
|
||||
|
||||
--- gcc/dwarf2out.c.jj 2007-11-23 18:10:20.000000000 +0100
|
||||
+++ gcc/dwarf2out.c 2007-11-24 14:58:20.000000000 +0100
|
||||
@@ -4146,6 +4146,7 @@ static tree member_declared_type (tree);
|
||||
static const char *decl_start_label (tree);
|
||||
#endif
|
||||
static void gen_array_type_die (tree, dw_die_ref);
|
||||
+static void gen_descr_array_type_die (tree, struct array_descr_info *, dw_die_ref);
|
||||
#if 0
|
||||
static void gen_entry_point_die (tree, dw_die_ref);
|
||||
#endif
|
||||
@@ -4552,8 +4553,8 @@ dwarf_attr_name (unsigned int attr)
|
||||
return "DW_AT_return_addr";
|
||||
case DW_AT_start_scope:
|
||||
return "DW_AT_start_scope";
|
||||
- case DW_AT_stride_size:
|
||||
- return "DW_AT_stride_size";
|
||||
+ case DW_AT_bit_stride:
|
||||
+ return "DW_AT_bit_stride";
|
||||
case DW_AT_upper_bound:
|
||||
return "DW_AT_upper_bound";
|
||||
case DW_AT_abstract_origin:
|
||||
@@ -4621,8 +4622,8 @@ dwarf_attr_name (unsigned int attr)
|
||||
return "DW_AT_associated";
|
||||
case DW_AT_data_location:
|
||||
return "DW_AT_data_location";
|
||||
- case DW_AT_stride:
|
||||
- return "DW_AT_stride";
|
||||
+ case DW_AT_byte_stride:
|
||||
+ return "DW_AT_byte_stride";
|
||||
case DW_AT_entry_pc:
|
||||
return "DW_AT_entry_pc";
|
||||
case DW_AT_use_UTF8:
|
||||
@@ -11169,6 +11170,159 @@ gen_array_type_die (tree type, dw_die_re
|
||||
add_type_attribute (array_die, element_type, 0, 0, context_die);
|
||||
}
|
||||
|
||||
+static dw_loc_descr_ref
|
||||
+descr_info_loc (tree val, tree base_decl)
|
||||
+{
|
||||
+ HOST_WIDE_INT size;
|
||||
+ dw_loc_descr_ref loc, loc2;
|
||||
+ enum dwarf_location_atom op;
|
||||
+
|
||||
+ if (val == base_decl)
|
||||
+ return new_loc_descr (DW_OP_push_object_address, 0, 0);
|
||||
+
|
||||
+ switch (TREE_CODE (val))
|
||||
+ {
|
||||
+ case NOP_EXPR:
|
||||
+ case CONVERT_EXPR:
|
||||
+ return descr_info_loc (TREE_OPERAND (val, 0), base_decl);
|
||||
+ case INTEGER_CST:
|
||||
+ if (host_integerp (val, 0))
|
||||
+ return int_loc_descriptor (tree_low_cst (val, 0));
|
||||
+ break;
|
||||
+ case INDIRECT_REF:
|
||||
+ size = int_size_in_bytes (TREE_TYPE (val));
|
||||
+ if (size < 0)
|
||||
+ break;
|
||||
+ loc = descr_info_loc (TREE_OPERAND (val, 0), base_decl);
|
||||
+ if (!loc)
|
||||
+ break;
|
||||
+ if (size == DWARF2_ADDR_SIZE)
|
||||
+ add_loc_descr (&loc, new_loc_descr (DW_OP_deref, 0, 0));
|
||||
+ else
|
||||
+ add_loc_descr (&loc, new_loc_descr (DW_OP_deref_size, size, 0));
|
||||
+ return loc;
|
||||
+ case PLUS_EXPR:
|
||||
+ if (host_integerp (TREE_OPERAND (val, 1), 1)
|
||||
+ && (unsigned HOST_WIDE_INT) tree_low_cst (TREE_OPERAND (val, 1), 1)
|
||||
+ < 16384)
|
||||
+ {
|
||||
+ loc = descr_info_loc (TREE_OPERAND (val, 0), base_decl);
|
||||
+ if (!loc)
|
||||
+ break;
|
||||
+ add_loc_descr (&loc,
|
||||
+ new_loc_descr (DW_OP_plus_uconst,
|
||||
+ tree_low_cst (TREE_OPERAND (val, 1),
|
||||
+ 1), 0));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ op = DW_OP_plus;
|
||||
+ do_binop:
|
||||
+ loc = descr_info_loc (TREE_OPERAND (val, 0), base_decl);
|
||||
+ if (!loc)
|
||||
+ break;
|
||||
+ loc2 = descr_info_loc (TREE_OPERAND (val, 1), base_decl);
|
||||
+ if (!loc2)
|
||||
+ break;
|
||||
+ add_loc_descr (&loc, loc2);
|
||||
+ add_loc_descr (&loc2, new_loc_descr (op, 0, 0));
|
||||
+ }
|
||||
+ return loc;
|
||||
+ case MINUS_EXPR:
|
||||
+ op = DW_OP_minus;
|
||||
+ goto do_binop;
|
||||
+ case MULT_EXPR:
|
||||
+ op = DW_OP_mul;
|
||||
+ goto do_binop;
|
||||
+ case EQ_EXPR:
|
||||
+ op = DW_OP_eq;
|
||||
+ goto do_binop;
|
||||
+ case NE_EXPR:
|
||||
+ op = DW_OP_ne;
|
||||
+ goto do_binop;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+add_descr_info_field (dw_die_ref die, enum dwarf_attribute attr,
|
||||
+ tree val, tree base_decl)
|
||||
+{
|
||||
+ dw_loc_descr_ref loc;
|
||||
+
|
||||
+ if (host_integerp (val, 0))
|
||||
+ {
|
||||
+ add_AT_unsigned (die, attr, tree_low_cst (val, 0));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ loc = descr_info_loc (val, base_decl);
|
||||
+ if (!loc)
|
||||
+ return;
|
||||
+
|
||||
+ add_AT_loc (die, attr, loc);
|
||||
+}
|
||||
+
|
||||
+/* This routine generates DIE for array with hidden descriptor, details
|
||||
+ are filled into *info by a langhook. */
|
||||
+
|
||||
+static void
|
||||
+gen_descr_array_type_die (tree type, struct array_descr_info *info,
|
||||
+ dw_die_ref context_die)
|
||||
+{
|
||||
+ dw_die_ref scope_die = scope_die_for (type, context_die);
|
||||
+ dw_die_ref array_die;
|
||||
+ int dim;
|
||||
+
|
||||
+ array_die = new_die (DW_TAG_array_type, scope_die, type);
|
||||
+ add_name_attribute (array_die, type_tag (type));
|
||||
+ equate_type_number_to_die (type, array_die);
|
||||
+
|
||||
+ if (info->data_location)
|
||||
+ add_descr_info_field (array_die, DW_AT_data_location, info->data_location,
|
||||
+ info->base_decl);
|
||||
+ if (info->associated)
|
||||
+ add_descr_info_field (array_die, DW_AT_associated, info->associated,
|
||||
+ info->base_decl);
|
||||
+ if (info->allocated)
|
||||
+ add_descr_info_field (array_die, DW_AT_allocated, info->allocated,
|
||||
+ info->base_decl);
|
||||
+
|
||||
+ for (dim = 0; dim < info->ndimensions; dim++)
|
||||
+ {
|
||||
+ dw_die_ref subrange_die
|
||||
+ = new_die (DW_TAG_subrange_type, array_die, NULL);
|
||||
+
|
||||
+ if (info->dimen[dim].lower_bound)
|
||||
+ {
|
||||
+ /* If it is the default value, omit it. */
|
||||
+ if ((is_c_family () || is_java ())
|
||||
+ && integer_zerop (info->dimen[dim].lower_bound))
|
||||
+ ;
|
||||
+ else if (is_fortran ()
|
||||
+ && integer_onep (info->dimen[dim].lower_bound))
|
||||
+ ;
|
||||
+ else
|
||||
+ add_descr_info_field (subrange_die, DW_AT_lower_bound,
|
||||
+ info->dimen[dim].lower_bound,
|
||||
+ info->base_decl);
|
||||
+ }
|
||||
+ if (info->dimen[dim].upper_bound)
|
||||
+ add_descr_info_field (subrange_die, DW_AT_upper_bound,
|
||||
+ info->dimen[dim].upper_bound,
|
||||
+ info->base_decl);
|
||||
+ if (info->dimen[dim].stride)
|
||||
+ add_descr_info_field (subrange_die, DW_AT_byte_stride,
|
||||
+ info->dimen[dim].stride,
|
||||
+ info->base_decl);
|
||||
+ }
|
||||
+
|
||||
+ gen_type_die (info->element_type, context_die);
|
||||
+ add_type_attribute (array_die, info->element_type, 0, 0, context_die);
|
||||
+}
|
||||
+
|
||||
#if 0
|
||||
static void
|
||||
gen_entry_point_die (tree decl, dw_die_ref context_die)
|
||||
@@ -12478,6 +12632,7 @@ static void
|
||||
gen_type_die (tree type, dw_die_ref context_die)
|
||||
{
|
||||
int need_pop;
|
||||
+ struct array_descr_info info;
|
||||
|
||||
if (type == NULL_TREE || type == error_mark_node)
|
||||
return;
|
||||
@@ -12496,6 +12651,16 @@ gen_type_die (tree type, dw_die_ref cont
|
||||
return;
|
||||
}
|
||||
|
||||
+ /* If this is an array type with hidden descriptor, handle it first. */
|
||||
+ if (!TREE_ASM_WRITTEN (type)
|
||||
+ && lang_hooks.types.get_array_descr_info
|
||||
+ && lang_hooks.types.get_array_descr_info (type, &info))
|
||||
+ {
|
||||
+ gen_descr_array_type_die (type, &info, context_die);
|
||||
+ TREE_ASM_WRITTEN (type) = 1;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* We are going to output a DIE to represent the unqualified version
|
||||
of this type (i.e. without any const or volatile qualifiers) so
|
||||
get the main variant (i.e. the unqualified version) of this type
|
||||
--- gcc/dwarf2out.h.jj 2007-02-20 22:39:12.000000000 +0100
|
||||
+++ gcc/dwarf2out.h 2007-11-24 15:00:14.000000000 +0100
|
||||
@@ -27,3 +27,19 @@ struct die_struct;
|
||||
extern void debug_dwarf_die (struct die_struct *);
|
||||
extern void dwarf2out_set_demangle_name_func (const char *(*) (const char *));
|
||||
extern void dwarf2out_add_library_unit_info (const char *, const char *);
|
||||
+
|
||||
+struct array_descr_info
|
||||
+{
|
||||
+ int ndimensions;
|
||||
+ tree element_type;
|
||||
+ tree base_decl;
|
||||
+ tree data_location;
|
||||
+ tree allocated;
|
||||
+ tree associated;
|
||||
+ struct array_descr_dimen
|
||||
+ {
|
||||
+ tree lower_bound;
|
||||
+ tree upper_bound;
|
||||
+ tree stride;
|
||||
+ } dimen[10];
|
||||
+};
|
128
gcc41.spec
128
gcc41.spec
@ -1,6 +1,6 @@
|
||||
%define DATE 20070925
|
||||
%define DATE 20071124
|
||||
%define gcc_version 4.1.2
|
||||
%define gcc_release 32
|
||||
%define gcc_release 34
|
||||
%define _unpackaged_files_terminate_build 0
|
||||
%define multilib_64_archs sparc64 ppc64 s390x x86_64
|
||||
%define include_gappletviewer 1
|
||||
@ -10,6 +10,12 @@
|
||||
%define build_ada 0
|
||||
%endif
|
||||
%define build_java 1
|
||||
# If you don't have already a usable gcc-java and libgcj for your arch,
|
||||
# do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec
|
||||
# which creates libjava-classes-%{version}-%{release}.tar.bz2
|
||||
# With this then on the new arch do rpmbuild -ba -v --with java_bootstrap gcc41.spec
|
||||
%define bootstrap_java %{?_with_java_bootstrap:%{build_java}}%{!?_with_java_bootstrap:0}
|
||||
%define build_java_tar %{?_with_java_tar:%{build_java}}%{!?_with_java_tar:0}
|
||||
%ifarch s390x
|
||||
%define multilib_32_arch s390
|
||||
%endif
|
||||
@ -47,7 +53,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
BuildRequires: binutils >= 2.17.50.0.17-3
|
||||
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
|
||||
%if %{build_java}
|
||||
BuildRequires: gcc-java, libgcj, /usr/share/java/eclipse-ecj.jar, zip, unzip
|
||||
BuildRequires: /usr/share/java/eclipse-ecj.jar, zip, unzip
|
||||
%if %{bootstrap_java}
|
||||
Source10: libjava-classes-%{version}-%{release}.tar.bz2
|
||||
%else
|
||||
BuildRequires: gcc-java, libgcj
|
||||
%endif
|
||||
%endif
|
||||
# Make sure pthread.h doesn't contain __thread tokens
|
||||
# Make sure glibc supports stack protector
|
||||
@ -154,10 +165,40 @@ Patch37: gcc41-pr33136.patch
|
||||
Patch38: gcc41-pr33238.patch
|
||||
Patch39: gcc41-pr33619.patch
|
||||
Patch40: gcc41-pr33639.patch
|
||||
Patch41: gcc41-pr33744.patch
|
||||
Patch42: gcc41-pr33763.patch
|
||||
Patch43: gcc41-rh317051.patch
|
||||
Patch44: gcc41-rh330771.patch
|
||||
Patch45: gcc41-rh341221.patch
|
||||
Patch47: gcc41-java-arm1.patch
|
||||
Patch48: gcc41-java-arm2.patch
|
||||
Patch49: gcc41-java-arm3.patch
|
||||
Patch50: gcc41-java-arm4.patch
|
||||
Patch51: gcc41-java-arm5.patch
|
||||
Patch52: gcc41-java-arm6.patch
|
||||
Patch53: gcc41-java-arm7.patch
|
||||
Patch54: gcc41-java-arm8.patch
|
||||
Patch55: gcc41-pr23848.patch
|
||||
Patch56: gcc41-pr29225.patch
|
||||
Patch57: gcc41-pr29712.patch
|
||||
Patch58: gcc41-pr30293.patch
|
||||
Patch59: gcc41-pr30988.patch
|
||||
Patch60: gcc41-pr32241.patch
|
||||
Patch61: gcc41-pr32384.patch
|
||||
Patch62: gcc41-pr33501.patch
|
||||
Patch63: gcc41-pr33516.patch
|
||||
Patch64: gcc41-pr33537.patch
|
||||
Patch65: gcc41-pr33616.patch
|
||||
Patch66: gcc41-pr33723.patch
|
||||
Patch67: gcc41-pr33836.patch
|
||||
Patch68: gcc41-pr33842.patch
|
||||
Patch69: gcc41-pr33844.patch
|
||||
Patch70: gcc41-pr33962.patch
|
||||
Patch71: gcc41-pr34070.patch
|
||||
Patch72: gcc41-pr34089.patch
|
||||
Patch73: gcc41-pr34094.patch
|
||||
Patch74: gcc41-pr34130.patch
|
||||
Patch75: gcc41-pr34146.patch
|
||||
Patch76: gcc41-rh364001.patch
|
||||
|
||||
# On ARM EABI systems, we do want -gnueabi to be part of the
|
||||
# target triple.
|
||||
@ -481,10 +522,44 @@ which are required to run programs compiled with the GNAT.
|
||||
%patch38 -p0 -b .pr33238~
|
||||
%patch39 -p0 -b .pr33619~
|
||||
%patch40 -p0 -b .pr33639~
|
||||
%patch41 -p0 -b .pr33744~
|
||||
%patch42 -p0 -b .pr33763~
|
||||
%patch43 -p0 -b .rh317051~
|
||||
%patch44 -p0 -b .rh330771~
|
||||
%patch45 -p0 -b .rh341221~
|
||||
%patch47 -p0 -b .java-arm1~
|
||||
%patch48 -p0 -b .java-arm2~
|
||||
%patch49 -p0 -b .java-arm3~
|
||||
%patch50 -p0 -b .java-arm4~
|
||||
%patch51 -p0 -b .java-arm5~
|
||||
%patch52 -p0 -b .java-arm6~
|
||||
%patch53 -p0 -b .java-arm7~
|
||||
%patch54 -p0 -b .java-arm8~
|
||||
%patch55 -p0 -b .pr23848~
|
||||
%patch56 -p0 -b .pr29225~
|
||||
%patch57 -p0 -b .pr29712~
|
||||
%patch58 -p0 -b .pr30293~
|
||||
%patch59 -p0 -b .pr30988~
|
||||
%patch60 -p0 -b .pr32241~
|
||||
%patch61 -p0 -b .pr32384~
|
||||
%patch62 -p0 -b .pr33501~
|
||||
%patch63 -p0 -b .pr33516~
|
||||
%patch64 -p0 -b .pr33537~
|
||||
%patch65 -p0 -b .pr33616~
|
||||
%patch66 -p0 -b .pr33723~
|
||||
%patch67 -p0 -b .pr33836~
|
||||
%patch68 -p0 -b .pr33842~
|
||||
%patch69 -p0 -b .pr33844~
|
||||
%patch70 -p0 -b .pr33962~
|
||||
%patch71 -p0 -b .pr34070~
|
||||
%patch72 -p0 -b .pr34089~
|
||||
%patch73 -p0 -b .pr34094~
|
||||
%patch74 -p0 -b .pr34130~
|
||||
%patch75 -p0 -b .pr34146~
|
||||
%patch76 -p0 -b .rh364001~
|
||||
|
||||
%if %{bootstrap_java}
|
||||
tar xjf %{SOURCE10}
|
||||
%endif
|
||||
|
||||
sed -i -e 's/4\.1\.3/4.1.2/' gcc/BASE-VER gcc/version.c
|
||||
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
|
||||
@ -531,6 +606,7 @@ if [ ! -f /usr/lib/locale/de_DE/LC_CTYPE ]; then
|
||||
fi
|
||||
|
||||
%if %{build_java}
|
||||
%if !%{bootstrap_java}
|
||||
# If we don't have gjavah in $PATH, try to build it with the old gij
|
||||
mkdir java_hacks
|
||||
cd java_hacks
|
||||
@ -557,6 +633,7 @@ chmod +x `pwd`/ecj1
|
||||
export PATH=`pwd`${PATH:+:$PATH}
|
||||
cd ..
|
||||
%endif
|
||||
%endif
|
||||
|
||||
CC=gcc
|
||||
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
|
||||
@ -607,6 +684,9 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" XCFLAGS="$OPT_FLAGS" TCFLAGS=
|
||||
--enable-libgcj-multifile --enable-java-maintainer-mode \
|
||||
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar \
|
||||
%endif
|
||||
%ifarch %{arm}
|
||||
--disable-sjlj-exceptions \
|
||||
%endif
|
||||
%ifarch ppc ppc64
|
||||
--enable-secureplt \
|
||||
%endif
|
||||
@ -707,6 +787,13 @@ cp -p libjava/LIBGCJ_LICENSE rpm.doc/libjava/
|
||||
rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
|
||||
find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
|
||||
|
||||
%if %{build_java_tar}
|
||||
find libjava -name \*.h -type f | xargs grep -l '// DO NOT EDIT THIS FILE - it is machine generated' > libjava-classes.list
|
||||
find libjava -name \*.class -type f >> libjava-classes.list
|
||||
find libjava/testsuite -name \*.jar -type f >> libjava-classes.list
|
||||
tar cf - -T libjava-classes.list | bzip2 -9 > $RPM_SOURCE_DIR/libjava-classes-%{version}-%{release}.tar.bz2
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -fr $RPM_BUILD_ROOT
|
||||
|
||||
@ -722,8 +809,10 @@ if [ ! -f /usr/lib/locale/de_DE/LC_CTYPE ]; then
|
||||
fi
|
||||
|
||||
%if %{build_java}
|
||||
%if !%{bootstrap_java}
|
||||
export PATH=`pwd`/java_hacks${PATH:+:$PATH}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
TARGET_PLATFORM=%{gcc_target_platform}
|
||||
|
||||
@ -1639,6 +1728,35 @@ fi
|
||||
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
||||
|
||||
%changelog
|
||||
* Sat Nov 24 2007 Jakub Jelinek <jakub@redhat.com> 4.1.2-34
|
||||
- update from gcc-4_1-branch (-r128736:130387)
|
||||
- PRs middle-end/34030, rtl-optimization/28062, rtl-optimization/33822
|
||||
- fix if-conversion to avoid introducing races into threaded code
|
||||
(Ian Lance Taylor, #391731)
|
||||
- some C++ visibility fixes (Jason Merrill, PRs c++/32470, c++/33094,
|
||||
c++/29365)
|
||||
- arm Java support (Andrew Haley, #246800)
|
||||
- add possibility to bootstrap gcj on architectures where libgcj
|
||||
isn't already available or is too old - build on some already
|
||||
supported arch the rpm with --with java_tar and the created
|
||||
tarball bring to the new arch and build --with java_bootstrap
|
||||
- backport a bunch of bugfixes from GCC trunk
|
||||
- PRs c++/29225, c++/30293, c++/30294, c++/30988, c++/32241,
|
||||
c++/32384, c++/33501, c++/33516, c++/33616, c++/33836,
|
||||
c++/33842, c++/33844, c++/33962, c++/34089, c++/34094,
|
||||
c/34146, debug/33537, middle-end/23848, middle-end/34070,
|
||||
testsuite/33978, tree-optimization/33723
|
||||
- fix abs optimization (Richard Guenther, #394271, PR middle-end/34130)
|
||||
- fortran lbound/ubound fix (Paul Thomas, #391151, PR fortran/29712)
|
||||
- generate proper fortran debuginfo for assumed-size, assumed-shape
|
||||
and deferred arrays (#364001)
|
||||
|
||||
* Sun Oct 21 2007 Jakub Jelinek <jakub@redhat.com> 4.1.2-33
|
||||
- rebuild to fix multilib conflict between i386 and x86_64 libgcj,
|
||||
set java man page timestamp from the timestamp of *.texinfo rather
|
||||
than current date to avoid this problem in the future (#341221)
|
||||
- fix ppc64 unwinding of cr2 register if vdso=0
|
||||
|
||||
* Tue Oct 16 2007 Jakub Jelinek <jakub@redhat.com> 4.1.2-32
|
||||
- only allow __label__ at the start of a block (PR c++/32121)
|
||||
- disable -fipa-type-escape by default (PR tree-optimization/33136)
|
||||
|
Loading…
Reference in New Issue
Block a user