Bug 216166

Summary: graphics/gegl3: clang 4.0 crashes during build (3 ports skipped)
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: needs-patch
Version: Latest   
Hardware: i386   
OS: Any   
URL: https://llvm.org/bugs/show_bug.cgi?id=31672
Bug Depends on:    
Bug Blocks: 216008    
Description Flags
gegl/buffer/gegl-sampler-nohalo.c (preprocessed, compressed)
command line args (for cc as clang 4.0) none

Description Jan Beich freebsd_committer 2017-01-17 08:47:29 UTC
Assertion failed: ((TLI.getTypeAction(*DAG.getContext(), Op.getValueType()) == TargetLowering::TypeLegal || TLI.isTypeLegal(Op.getValueType()) || Op.getOpcode() == ISD::TargetConstant) && "Unexpected illegal type!"), function LegalizeOp, file /usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 921.
cc: error: unable to execute command: Abort trap
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 4.0.0 (branches/release_40 292009) (based on LLVM 4.0.0)
Target: i386-unknown-freebsd12.0

build log: http://sprunge.us/eAMU
Comment 1 Jan Beich freebsd_committer 2017-01-17 16:55:06 UTC
Created attachment 178998 [details]
gegl/buffer/gegl-sampler-nohalo.c (preprocessed, compressed)
Comment 2 Jan Beich freebsd_committer 2017-01-17 16:56:13 UTC
Created attachment 178999 [details]
command line args (for cc as clang 4.0)
Comment 3 Jan Beich freebsd_committer 2017-01-17 16:58:49 UTC
Can you reproduce on /projects/clang400-import@312309 or devel/llvm-devel after editing .sh file?
Comment 4 Dimitry Andric freebsd_committer 2017-01-17 18:30:04 UTC
(In reply to Jan Beich (mail not working) from comment #3)
> Can you reproduce on /projects/clang400-import@312309 or devel/llvm-devel
> after editing .sh file?

Yes, I can reproduce with clang 4.0.0 (branches/release_40 292009) (as in the clang400-import branch).  Investigating...
Comment 5 Dimitry Andric freebsd_committer 2017-01-17 19:23:32 UTC
Minimized a test case, and submitted it upstream as https://llvm.org/bugs/show_bug.cgi?id=31672
Comment 6 commit-hook freebsd_committer 2017-01-22 18:32:11 UTC
A commit references this bug:

Author: dim
Date: Sun Jan 22 18:31:49 UTC 2017
New revision: 312643
URL: https://svnweb.freebsd.org/changeset/base/312643

  Pull in r292758 from upstream llvm trunk (by Sanjay Patel):

    [x86] avoid crashing with illegal vector type (PR31672)


  This fixes an assertion while building graphics/gegl3.

  PR:		216166

Comment 7 Dimitry Andric freebsd_committer 2017-01-22 19:45:05 UTC
After r312643, I can build graphics/gegl to completion now, with the SIMD option checked.
Comment 8 Jan Beich freebsd_committer 2017-01-23 00:12:04 UTC
graphics/gegl3, like graphics/svgalib, is a blocker for x11/gnome3 metaport. It doesn't have SIMD option unlike graphics/gegl. Anyway, gegl3 builds fine now: http://sprunge.us/NPdF