Bug 224866

Summary: graphics/xpx: 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: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 224669    
Description Flags
colset.c (preprocessed, compressed)
command line args (for clang 6.0) none

Description Jan Beich freebsd_committer 2018-01-03 15:54:41 UTC
cc  -O2 -pipe  -fstack-protector -fno-strict-aliasing       -I/usr/local/include    -DCSRG_BASED  -DFUNCPROTO=15 -DNARROWPROTO     -c colset.c -o colset.o
Assertion failed: (ScaledReg == nullptr), function SetCombinedField, file /poudriere/jails/projects/clang600-import-amd64/usr/src/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp, line 1973.
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 6.0.0 (trunk 321545) (based on LLVM 6.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

Comment 1 Jan Beich freebsd_committer 2018-01-03 15:55:04 UTC
Created attachment 189366 [details]
colset.c (preprocessed, compressed)
Comment 2 Jan Beich freebsd_committer 2018-01-03 15:55:23 UTC
Created attachment 189367 [details]
command line args (for clang 6.0)
Comment 3 Dimitry Andric freebsd_committer 2018-01-03 18:54:09 UTC
Reported upstream: https://bugs.llvm.org/show_bug.cgi?id=35805
Comment 4 commit-hook freebsd_committer 2018-01-09 17:42:12 UTC
A commit references this bug:

Author: dim
Date: Tue Jan  9 17:41:35 UTC 2018
New revision: 327734
URL: https://svnweb.freebsd.org/changeset/base/327734

  Pull in r322056 from upstream llvm trunk (by Serguei Katkov):

    [CGP] Fix Complex addressing mode for offset

    If the offset is differ in two addressing mode we can continue only
    if ScaleReg is not set due to we will use it as merge of different

    It should fix PR35799 and PR35805.

    Reviewers: john.brawn, reames
    Reviewed By: reames
    Subscribers: llvm-commits
    Differential Revision: https://reviews.llvm.org/D41227

  This should fix "ScaledReg == nullptr" assertions when building the
  graphics/xpx, mail/alpine and editors/pico-alpine ports.

  Reported by:	jbeich
  PR:		224866, 224995

Comment 5 Dimitry Andric freebsd_committer 2018-01-15 18:18:57 UTC
Assuming this is fixed now.
Comment 6 Jan Beich freebsd_committer 2018-01-15 18:29:01 UTC
I confirm, the port built fine at least on amd64.