From: jakub Date: Mon, 26 Nov 2018 21:26:19 +0000 (+0000) Subject: PR target/88195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1ba68e931df6df898b66488702718dd40b7d481;p=thirdparty%2Fgcc.git PR target/88195 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64 and !TARGET_64BIT, return NULL_TREE. * gcc.target/i386/pr88195.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266487 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 42f2ff059e3f..2d7bcb83f33d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2018-11-26 Jakub Jelinek + PR target/88195 + * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64 + and !TARGET_64BIT, return NULL_TREE. + PR c++/86900 * dwarf2out.c (secname_for_decl): For functions with DECL_SECTION_NAME if in_cold_section_p, try to return diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 851598004ccf..95abde95f89d 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -30220,9 +30220,13 @@ def_builtin2 (HOST_WIDE_INT mask, const char *name, { tree decl = NULL_TREE; - ix86_builtins_isa[(int) code].isa2 = mask; if (tcode == VOID_FTYPE_UINT64) - ix86_builtins_isa[(int) code].isa = OPTION_MASK_ISA_64BIT; + { + if (!TARGET_64BIT) + return decl; + ix86_builtins_isa[(int) code].isa = OPTION_MASK_ISA_64BIT; + } + ix86_builtins_isa[(int) code].isa2 = mask; if (mask == 0 || (mask & ix86_isa_flags2) != 0 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4043524049da..47f8b1993575 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2018-11-26 Jakub Jelinek + PR target/88195 + * gcc.target/i386/pr88195.c: New test. + PR testsuite/88090 * obj-c++.dg/attributes/method-nonnull-1.mm (my_size_t): New typedef. (MyArray::removeObjectAtIndex): Use my_size_t instead of size_t and diff --git a/gcc/testsuite/gcc.target/i386/pr88195.c b/gcc/testsuite/gcc.target/i386/pr88195.c new file mode 100644 index 000000000000..cd12adc063ae --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr88195.c @@ -0,0 +1,8 @@ +/* PR target/88195 */ +/* { dg-options "-mptwrite" } */ + +void +foo (void) +{ + __builtin_ia32_ptwrite64 (1); /* { dg-warning "implicit declaration of function" "" { target ia32 } } */ +}