LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 47265 - fatal internal error: CHECK(length.isExplicit()) failed at llvm-project/flang/lib/Semantics/compute-offsets.cpp(357)
Summary: fatal internal error: CHECK(length.isExplicit()) failed at llvm-project/flang...
Status: RESOLVED FIXED
Alias: None
Product: flang
Classification: Unclassified
Component: Frontend (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-21 01:01 PDT by Riccardo Bertossa
Modified: 2020-08-25 14:32 PDT (History)
7 users (show)

See Also:
Fixed By Commit(s):


Attachments
source code that triggers the problem (8.20 KB, application/x-bzip)
2020-08-21 01:01 PDT, Riccardo Bertossa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Bertossa 2020-08-21 01:01:31 PDT
Created attachment 23870 [details]
source code that triggers the problem

I'm trying to compile the full Quantum Espresso ( https://www.quantum-espresso.org/) project with flang, but the build fails very early with the command reported. I'm using the last git version of the full llvm-project, that I compiled from source with gcc 8.3.0 and 

cmake -DCMAKE_INSTALL_PREFIX=/scratch/llvm/ -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;flang;lld;clang-tools-extra;libunwind;compiler-rt;openmp;polly;libclc;klee" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ../llvm

the problem is the following:

$ flang iotk_attr_interf.f90 -c
fatal internal error: CHECK(length.isExplicit()) failed at 
 scratch/rbertoss/llvm/llvm-project/flang/lib/Semantics/compute-offsets.cpp(357)                                
/scratch/llvm/bin/flang: line 29: 23708 Aborted                 (core dumped) ${wd}/bin/f18 -module-suffix .f18.mod -intrinsic-module-directory /scratch/llvm/include/flang $*

You can find in the attachment a set of source files that reproduce the problem

thank you
Comment 1 Tim Keith 2020-08-22 12:08:40 PDT
This is fixed by https://reviews.llvm.org/D86357
Comment 2 Riccardo Bertossa 2020-08-23 12:16:00 PDT
(In reply to Tim Keith from comment #1)
> This is fixed by https://reviews.llvm.org/D86357

I recompiled with make after pulling from github and I still get the same internal error, with the same fortran source. Should I do something more?
Comment 3 Tim Keith 2020-08-24 18:25:39 PDT
Sorry about that. I've pushed another fix. Please try again.