Bug 225271

Summary: games/dhewm3: clang 6 crashes during build
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Dimitry Andric <dim>
Status: Closed FIXED    
Severity: Affects Only Me CC: dim
Priority: --- Keywords: toolchain
Version: Latest   
Hardware: i386   
OS: Any   
Bug Depends on:    
Bug Blocks: 224669    
Description Flags
renderer/Image_init.cpp (compressed, preprocessed)
command line args (for clang 6.0) none

Description Jan Beich freebsd_committer 2018-01-17 17:44:47 UTC
Created attachment 189846 [details]
renderer/Image_init.cpp (compressed, preprocessed)

/usr/bin/c++  -DID_DEDICATED -D__DOOM_DLL__ -I/usr/local/include -I/usr/local/include/AL -I/usr/local/include/SDL2 -I. -O2 -pipe -fstack-protector -fno-strict-aliasing -O3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer   -pipe -Wall -march=pentium3 -fno-strict-aliasing -fvisibility=hidden -Wno-sign-compare -Wno-switch -Wno-format-security -Woverloaded-virtual -MD -MT CMakeFiles/dhewm3ded.dir/renderer/Image_init.cpp.o -MF CMakeFiles/dhewm3ded.dir/renderer/Image_init.cpp.o.d -o CMakeFiles/dhewm3ded.dir/renderer/Image_init.cpp.o -c renderer/Image_init.cpp
Not a vector MVT!
UNREACHABLE executed at /usr/local/poudriere/jails/head-i386/usr/src/contrib/llvm/include/llvm/CodeGen/MachineValueType.h:417!
c++: error: unable to execute command: Abort trap (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 6.0.0 (branches/release_60 321788) (based on LLVM 6.0.0)
Target: i386-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

Comment 1 Jan Beich freebsd_committer 2018-01-17 17:45:19 UTC
Created attachment 189847 [details]
command line args (for clang 6.0)
Comment 2 Dimitry Andric freebsd_committer 2018-01-18 19:09:13 UTC
This seems to be https://bugs.llvm.org/show_bug.cgi?id=35865, I'm investigating whether https://reviews.llvm.org/rL322106 helps.
Comment 3 commit-hook freebsd_committer 2018-01-18 21:46:21 UTC
A commit references this bug:

Author: dim
Date: Thu Jan 18 21:46:10 UTC 2018
New revision: 328146
URL: https://svnweb.freebsd.org/changeset/base/328146

  Pull in r322106 from upstream llvm trunk (by Alexey Bataev):

    [COST]Fix PR35865: Fix cost model evaluation for shuffle on X86.

    If the vector type is transformed to non-vector single type, the
    compile may crash trying to get vector information about non-vector

    Reviewers: RKSimon, spatel, mkuper, hfinkel

    Subscribers: llvm-commits

    Differential Revision: https://reviews.llvm.org/D41862

  This should fix "Not a vector MVT!" errors when building the
  games/dhewm3 port.

  Reported by:	jbeich
  PR:		225271