Bug 227339 - clang crashes with error in backend: SSE2 register return with SSE2 disabled
Summary: clang crashes with error in backend: SSE2 register return with SSE2 disabled
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-07 11:10 UTC by dev
Modified: 2018-04-08 15:28 UTC (History)
2 users (show)

See Also:


Attachments
preprocessed file and invocation script (69.79 KB, application/x-xz)
2018-04-07 11:10 UTC, dev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description dev 2018-04-07 11:10:55 UTC
Created attachment 192303 [details]
preprocessed file and invocation script

While trying to update the databases/arangodb33 port to the latest upstream version, this happens. Attached are the preprocessed source file and invocation script.
Comment 1 dev 2018-04-07 19:46:06 UTC
This is clang 4.0 in 11.1-RELEASE-p8.
Comment 2 Dimitry Andric freebsd_committer 2018-04-08 10:27:33 UTC
This also reproduces with clang from head:

/usr/ports/databases/arangodb33/work/arangodb-3.3.6.1/3rdParty/curl/curl-7.50.3/lib/timeval.c:137:8: error: SSE2 register return with SSE2 disabled
double curlx_tvdiff_secs(struct timeval newer, struct timeval older)
       ^
1 error generated.

and I think the problem is that the command line options make it impossible to compile this source.  E.g. it compiles for amd64, but something passes:

-mno-sse2
-mno-sse3
-mno-ssse3
-mno-sse4.1
-mno-sse4.2
-mno-sse4a
-mno-avx
-mno-fma
-mno-bmi2
-mno-avx2
-mno-xop
-mno-fma4
-mno-avx512f
-mno-avx512vl
-mno-avx512pf
-mno-avx512er
-mno-avx512cd
-mno-avx512dq
-mno-avx512bw
-mno-avx512ifma
-mno-avx512vbmi

on the command line, making it impossible to work with doubles in the amd64 ABI.  You should try removing all the -mno-* options, and see if it compiles then.