[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #6 from Martin Liška  ---
I added missing option value to documentation.
Closing as dup.

*** This bug has been marked as a duplicate of bug 71991 ***

[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

Martin Liška  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED

--- Comment #5 from Martin Liška  ---
(In reply to Дилян Палаузов from comment #4)
> Why does COLLECT_GCC_OPTIONS show '-march=x86-64', but
> https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html does not show x86-64 as
> valid option for -march?

It's error. Let me fix that.

> 
> Why doesn't 'make CFLAGS="--verbose -march=native -flto"' work, in terms of
> detecting that ssse3 is available and there is no conflict?
> 

It's probably duplicate of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71991
Can you please confirm that?

[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-21 Thread dilyan.palauzov at aegee dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

Дилян Палаузов  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--- Comment #4 from Дилян Палаузов  ---
Why does COLLECT_GCC_OPTIONS show '-march=x86-64', but
https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html does not show x86-64 as
valid option for -march?

Why doesn't 'make CFLAGS="--verbose -march=native -flto"' work, in terms of
detecting that ssse3 is available and there is no conflict?

The latter prints:



make[3]: Leaving directory '/git/postgresql/src/backend'
gcc --verbose -march=native -flto -I../../src/port -DFRONTEND
-I../../src/include  -D_GNU_SOURCE -I/usr/local/include/libxml2   -c -o
pg_crc32c_sse42.o pg_crc32c_sse42.c
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-linux-gnu
Configured with: ./configure --enable-threads=posix --enable-nls
--enable-interpreter --with-system-zlib --enable-libgcj-multifile
--enable-languages=all --enable-targets=all --with-system-unwind --without-x
--with-linker-hash-style=gnu --disable-multilib --enable-shared
--with-build-config='bootstrap-lto bootstrap-O3'
Thread model: posix
gcc version 7.3.1 20180316 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-march=native' '-flto' '-I' '../../src/port' '-D'
'FRONTEND' '-I' '../../src/include' '-D' '_GNU_SOURCE' '-I'
'/usr/local/include/libxml2' '-c' '-o' 'pg_crc32c_sse42.o'
 /usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/cc1 -quiet -v -I
../../src/port -I ../../src/include -I /usr/local/include/libxml2 -imultiarch
x86_64-linux-gnu -D FRONTEND -D _GNU_SOURCE pg_crc32c_sse42.c -march=nocona
-mmmx -mno-3dnow -msse -msse2 -msse3 -mno-ssse3 -mno-sse4a -mcx16 -msahf
-mno-movbe -mno-aes -mno-sha -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma
-mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-tbm -mno-avx -mno-avx2
-mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c
-mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt
-mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1
-mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw
-mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps
-mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid --param
l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096
-mtune=nocona -quiet -dumpbase pg_crc32c_sse42.c -auxbase-strip
pg_crc32c_sse42.o -version -flto -o /tmp/cch1CzQr.s
GNU C11 (GCC) version 7.3.1 20180316 (x86_64-pc-linux-gnu)
compiled by GNU C version 7.3.1 20180316, GMP version 6.1.2, MPFR
version 4.0.0, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 ../../src/port
 ../../src/include
 /usr/local/include/libxml2
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C11 (GCC) version 7.3.1 20180316 (x86_64-pc-linux-gnu)
compiled by GNU C version 7.3.1 20180316, GMP version 6.1.2, MPFR
version 4.0.0, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e97c32a4d3c4d8b00665455dd270ad26
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0,
 from pg_crc32c_sse42.c:19:
pg_crc32c_sse42.c: In function ‘pg_comp_crc32c_sse42’:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:846:1: error:
inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific
option mismatch
 _mm_crc32_u64 (unsigned long long __C, unsigned long long __V)
 ^
pg_crc32c_sse42.c:37:18: note: called from here
   crc = (uint32) _mm_crc32_u64(crc, *((const uint64 *) p));
  ^
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0,
 from pg_crc32c_sse42.c:19:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:839:1: error:
inlining failed in call to always_inline ‘_mm_crc32_u32’: target specific
option mismatch
 _mm_crc32_u32 (unsigned int __C, unsigned int __V)
 ^
pg_crc32c_sse42.c:44:7: note: called from here
   crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
   ^
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0,
 from 

[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Martin Liška  ---
The issue is that it uses always_inline for a function that uses -msse3 and you
use -march=native and -mtune=generic.

If I configure postgres with :
CFLAGS="-mtune=generic -march=x86-64"
CXXFLAGS=...
LDFLAGS=...

then it builds fine. The file should not be built with the flags.
Clang has nicer error message:
 error: always_inline function '_mm_crc32_u64' requires target feature 'ssse3',
but would be inlined into function 'pg_comp_crc32c_sse42' that is compiled
without support for 'ssse3'

[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-18 Thread dilyan.palauzov at aegee dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

--- Comment #2 from Дилян Палаузов  ---
make -C src all
make[1]: Entering directory '/git/postgresql/src'
make -C common all
make[2]: Entering directory '/git/postgresql/src/common'
make -C ../backend submake-errcodes
make[3]: Entering directory '/git/postgresql/src/backend'
make[3]: Nothing to be done for 'submake-errcodes'.
make[3]: Leaving directory '/git/postgresql/src/backend'
make[2]: Leaving directory '/git/postgresql/src/common'
make -C port all
make[2]: Entering directory '/git/postgresql/src/port'
make -C ../backend submake-errcodes
make[3]: Entering directory '/git/postgresql/src/backend'
make[3]: Nothing to be done for 'submake-errcodes'.
make[3]: Leaving directory '/git/postgresql/src/backend'
gcc -flto --verbose -I../../src/port -DFRONTEND -I../../src/include 
-D_GNU_SOURCE -I/usr/local/include/libxml2   -c -o pg_crc32c_sse42.o
pg_crc32c_sse42.c
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-linux-gnu
Configured with: ./configure --enable-threads=posix --enable-nls
--enable-interpreter --with-system-zlib --enable-libgcj-multifile
--enable-languages=all --enable-targets=all --with-system-unwind --without-x
--with-linker-hash-style=gnu --disable-multilib --enable-shared
--with-build-config='bootstrap-lto bootstrap-O3'
Thread model: posix
gcc version 7.3.1 20180316 (GCC) 
COLLECT_GCC_OPTIONS='-flto' '-v' '-I' '../../src/port' '-D' 'FRONTEND' '-I'
'../../src/include' '-D' '_GNU_SOURCE' '-I' '/usr/local/include/libxml2' '-c'
'-o' 'pg_crc32c_sse42.o' '-mtune=generic' '-march=x86-64'
 /usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/cc1 -quiet -v -I
../../src/port -I ../../src/include -I /usr/local/include/libxml2 -imultiarch
x86_64-linux-gnu -D FRONTEND -D _GNU_SOURCE pg_crc32c_sse42.c -quiet -dumpbase
pg_crc32c_sse42.c -mtune=generic -march=x86-64 -auxbase-strip pg_crc32c_sse42.o
-version -flto -o /tmp/cce8jOUn.s
GNU C11 (GCC) version 7.3.1 20180316 (x86_64-pc-linux-gnu)
compiled by GNU C version 7.3.1 20180316, GMP version 6.1.2, MPFR
version 4.0.0, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 ../../src/port
 ../../src/include
 /usr/local/include/libxml2
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C11 (GCC) version 7.3.1 20180316 (x86_64-pc-linux-gnu)
compiled by GNU C version 7.3.1 20180316, GMP version 6.1.2, MPFR
version 4.0.0, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e97c32a4d3c4d8b00665455dd270ad26
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0,
 from pg_crc32c_sse42.c:19:
pg_crc32c_sse42.c: In function ‘pg_comp_crc32c_sse42’:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:846:1: error:
inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific
option mismatch
 _mm_crc32_u64 (unsigned long long __C, unsigned long long __V)
 ^
pg_crc32c_sse42.c:37:18: note: called from here
   crc = (uint32) _mm_crc32_u64(crc, *((const uint64 *) p));
  ^
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0,
 from pg_crc32c_sse42.c:19:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:839:1: error:
inlining failed in call to always_inline ‘_mm_crc32_u32’: target specific
option mismatch
 _mm_crc32_u32 (unsigned int __C, unsigned int __V)
 ^
pg_crc32c_sse42.c:44:7: note: called from here
   crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
   ^
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0,
 from pg_crc32c_sse42.c:19:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:827:1: error:
inlining failed in call to always_inline ‘_mm_crc32_u8’: target specific option
mismatch
 _mm_crc32_u8 (unsigned int __C, unsigned char __V)
 ^~~~
pg_crc32c_sse42.c:63:7: note: called from here
   crc = _mm_crc32_u8(crc, *p);
   ^~~
make[2]: *** [: pg_crc32c_sse42.o] Error 1
make[2]: Leaving directory '/git/postgresql/src/port'
make[1]: *** [Makefile:38: all-port-recurse] Error 2
make[1]: Leaving directory '/git/postgresql/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2

[Bug target/84926] error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64

2018-03-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-03-18
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
It will be unrelated, please attach content of --verbose for the problematic
source file.