This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix builtin asm redirection (PR middle-end/39443)


On Tue, Mar 17, 2009 at 3:18 PM, Ian Lance Taylor <iant@google.com> wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
>
>> 2009-03-12 ?Jakub Jelinek ?<jakub@redhat.com>
>>
>> ? ? ? PR middle-end/39443
>> ? ? ? * optabs.c (set_user_assembler_libfunc): New function.
>> ? ? ? * expr.h (set_user_assembler_libfunc): New prototype.
>> ? ? ? * c-common.c: Include libfuncs.h.
>> ? ? ? (set_builtin_user_assembler_name): Call set_user_assembler_libfunc
>> ? ? ? for memcmp, memset, memcpy, memmove and abort.
>>
>> ? ? ? * gcc.dg/pr39443.c: New test.
>
>
>> + ?id = get_identifier (name);
>> + ?hash = htab_hash_string (name);
>> + ?slot = htab_find_slot_with_hash (libfunc_decls, id, hash, INSERT);
>> + ?decl = (tree) *slot;
>> + ?gcc_assert (decl);
>> + ?set_user_assembler_name (decl, asmspec);
>> + ?return XEXP (DECL_RTL (decl), 0);
>
> Since this code is never going to actually insert anything into the hash
> table, I think it would be a tiny bit clearer if you write it as
>
> ?slot = htab_find_slot_with_hash (libfunc_decls, id, hash, NO_INSERT);
> ?gcc_assert (slot);
> ?decl = (tree) *slot;
> ?set_user_assembler_name (decl, asmspec);
>
> OK with that change.

I think this broke glibc 2.6 build on the openSUSE base tester.  It
now fails with

/usr/src/packages/BUILD/glibc-2.6/cc-nptl/libc_pic.os: In function
`*__GI_setlocale':
/usr/src/packages/BUILD/glibc-2.6/locale/setlocale.c:287: undefined
reference to `__GI_memcmp'
/usr/src/packages/BUILD/glibc-2.6/cc-nptl/libc_pic.os: In function
`ptmalloc_init':
/usr/src/packages/BUILD/glibc-2.6/malloc/arena.c:518: undefined
reference to `__GI_memcmp'
/usr/src/packages/BUILD/glibc-2.6/malloc/arena.c:524: undefined
reference to `__GI_memcmp'
/usr/src/packages/BUILD/glibc-2.6/malloc/arena.c:526: undefined
reference to `__GI_memcmp'
/usr/src/packages/BUILD/glibc-2.6/malloc/arena.c:537: undefined
reference to `__GI_memcmp'
/usr/src/packages/BUILD/glibc-2.6/cc-nptl/libc_pic.os:/usr/src/packages/BUILD/glibc-2.6/malloc/arena.c:539:
more undefined references to `__GI_memcmp' follow
collect2: ld returned 1 exit status
make[1]: *** [/usr/src/packages/BUILD/glibc-2.6/cc-nptl/libc.so] Error 1

last known good rev. is 144898, first bad rev. is 144927.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]