https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118441
--- Comment #1 from anlauf at gcc dot gnu.org ---
Further reduced:
subroutine sub(s)
character(len=*), intent(inout) :: s(:)
s(1:1) = pack (s(1:1), mask=.true.) ! ICE
end subroutine sub
There is no difference in the tree dump between -fno-openmp and -fopenmp
for 14-release, but 15-trunk has this strange snippet in the assignment:
if (S.6 > 0) goto L.1;
{
- integer(kind=8) D.4849;
- integer(kind=8) D.4850;
- void * D.4851;
- void * D.4852;
+ integer(kind=8) D.4860;
+ integer(kind=8) D.4861;
+ void * D.4862;
+ void * D.4863;
- D.4849 = _s;
- D.4850 = _s;
- D.4851 = (void *) s.0 + (sizetype) (((S.6 + 1) * D.4848 + D.4821)
* NON_LVALUE_>
- D.4852 = (void *) &(*(character(kind=1)[1][1:_s] * restrict)
atmp.5.data)[S.6];
- if (D.4850 > 0)
+ D.4860 = _s;
+ D.4861 = .__result;
+ D.4862 = (void *) s.0 + (sizetype) (((S.6 + 1) * D.4859 + D.4822)
* NON_LVALUE_>
+ D.4863 = (void *) &(*(character(kind=1)[1][1:_s] * restrict)
atmp.5.data)[S.6];
+ if (D.4861 > 0)
{
Note the appearance of "D.4861 = .__result;" with -fopenmp.