This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Clang collapses on template with 64 parameters


Agner Fog wrote:
Here's another bug report.

Cygwin Clang fails when compiling a complicated program with big templates. The same program compiles OK on Linux clang.

I have not made a minimal test case because smaller cases compile ok.

The test case is too big for attaching to a mailing list, so I have made it available at:

https://www.agner.org/rapporter/cygwin_clang_template_bug.zip

Command line:

clang  -m64 -std=c++17 -O2  -mfma -mavx512bw -mavx512dq -mavx512vl testbench2.cpp

The compiler issues a long message:

fatal error: error in backend: Cannot select: 0x6019f23c0: ch =
store<ST64[%169](tbaa=<0x600f4af78>)(alias.scope=<0x601890348>,<0x6018c6ab8>)> 0x601a239c8,
       0x6019f2018, FrameIndex:i64<7>, undef:i64
  0x6019f2018: v64i8,ch = VPSHUFBZrm<Mem:LD64[ConstantPool]> 0x6019dadb8, 0x6019db438, TargetConstant:i8<1>, Register:i64 %noreg, TargetConstant:i32<0>, Register:i32 %noreg, 0x601926528
     0x6019dadb8: v64i8 = bitcast 0x6019f1c08
       0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
         0x6019db368: v2i64 = extract_subvector 0x6019f1c08, Constant:i64<0>
           0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
             0x6019db368: v2i64 = extract_subvector 0x6019f1c08, Constant:i64<0>
               0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368
                0x6019db368: v2i64 = extract_subvector 0x6019f1c08, Constant:i64<0>
                   0x6019f1c08: v8i64 = VPBROADCASTQZr 0x6019db368

                   0x601a23758: i64 = Constant<0>
               0x601a23758: i64 = Constant<0>
           0x601a23758: i64 = Constant<0>
    0x6019db438: i64 = X86ISD::Wrapper TargetConstantPool:i64<<64 x i8> <i8 0, i8 1, i8 2, i8 -128, i8 4, i8 5, i8 6, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>> 0       0x6019dbcc0: i64 = TargetConstantPool<<64 x i8> <i8 0, i8 1, i8 2, i8 -128, i8 4, i8 5, i8 6, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>> 0
     0x6019db848: i8 = TargetConstant<1>
     0x6019f1a68: i64 = Register %noreg
     0x6019f20e8: i32 = TargetConstant<0>
     0x601a23620: i32 = Register %noreg
   0x6019dae20: i64 = FrameIndex<7>
   0x6019f2288: i64 = undef
In function: main
clang-5.0: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-windows-cygnus
Thread model: posix
InstalledDir: /usr/bin
clang-5.0: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, preprocessed source, and associated run script.
clang-5.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-5.0: note: diagnostic msg: /tmp/testbench2-31c6c0.cpp
clang-5.0: note: diagnostic msg: /tmp/testbench2-31c6c0.sh
clang-5.0: note: diagnostic msg:

********************

The diagnostic files are included in the zip as diagnostic*

Just like your previous Clang bug report, this one, as detailed and complete as any developer could want :-), should also go to the Clang bugtracker at https://bugs.llvm.org.

..mark


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]