[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-04-17 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #11 from Martin Liška  ---
Dup.

*** This bug has been marked as a duplicate of bug 94612 ***

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-04-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #10 from Richard Biener  ---
(In reply to Martin Liška from comment #9)
> (In reply to Martin Liška from comment #8)
> > @Richi: Can you please enable zstd for our nvptx cross compiler:
> > 
> > $ x86_64-suse-linux-accel-nvptx-none-gcc-10 -v
> > ...
> > Supported LTO compression algorithms: zlib
> > 
> > We'll need to add
> > BuildRequires: libzstd-devel
> > 
> > into cross spec file.
> 
> @Richi: PING

done

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-04-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #9 from Martin Liška  ---
(In reply to Martin Liška from comment #8)
> @Richi: Can you please enable zstd for our nvptx cross compiler:
> 
> $ x86_64-suse-linux-accel-nvptx-none-gcc-10 -v
> ...
> Supported LTO compression algorithms: zlib
> 
> We'll need to add
> BuildRequires: libzstd-devel
> 
> into cross spec file.

@Richi: PING

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #8 from Martin Liška  ---
@Richi: Can you please enable zstd for our nvptx cross compiler:

$ x86_64-suse-linux-accel-nvptx-none-gcc-10 -v
...
Supported LTO compression algorithms: zlib

We'll need to add
BuildRequires: libzstd-devel

into cross spec file.

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #7 from Matthias Klose  ---
$ gfortran-10 -flto -c program.f90

$ readelf -SW program.o  | grep lto_.lto
  [ 6] .gnu.lto_.lto.c7eb6f75a94ea29a PROGBITS cc
08 00   E  0   0  1

$ objdump -s -j .gnu.lto_.lto.c7eb6f75a94ea29a program.o 

program.o: file format elf64-x86-64

Contents of section .gnu.lto_.lto.c7eb6f75a94ea29a:
  0900 01000100

Yes, I get the very same stacktrace ending in lto_uncompression_zlib.

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #6 from Martin Liška  ---
(In reply to Matthias Klose from comment #3)
> $ gfortran-10 -v -fopenacc program.f90 2>&1 |grep zstd
> Supported LTO compression algorithms: zlib zstd
> Supported LTO compression algorithms: zlib zstd
> 
> afaics both builds are correctly configured.

Then you can dump lto header in a .o file:

$ gcc -flto -c bss.c
$ readelf -SW bss.o  | grep lto_.lto
  [ 6] .gnu.lto_.lto.2cfeb5fb4c8095f PROGBITS 62
08 00   E  0   0  1

$ objdump -s -j .gnu.lto_.lto.2cfeb5fb4c8095f bss.o

bss.o: file format elf64-x86-64

Contents of section .gnu.lto_.lto.2cfeb5fb4c8095f:
  0900 01000100

that ending 0100 is zstd == 1.

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #5 from Richard Biener  ---
Btw, your backtrace ends up in lto_uncompression_zlib but Matthias shows the
Ubuntu packages have zstd enabled.  I'd have expected only zstd compressed
sections there.  Matthias, can you reproduce the issue?

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

--- Comment #4 from Richard Biener  ---
So I tried it with the SUSE GCC 10 packages and it works fine (I've
double-checked nvptx is offloaded).  But my packages are only configured for
zlib ...
(I'm testing on Leap 15.1 which doesn't have zstd I think).

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread doko at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

Matthias Klose  changed:

   What|Removed |Added

 CC||doko at debian dot org

--- Comment #3 from Matthias Klose  ---
$ gfortran-10 -v -fopenacc program.f90 2>&1 |grep zstd
Supported LTO compression algorithms: zlib zstd
Supported LTO compression algorithms: zlib zstd

afaics both builds are correctly configured.

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

Martin Liška  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2020-03-11
 Status|UNCONFIRMED |NEW

--- Comment #2 from Martin Liška  ---
(In reply to Richard Biener from comment #1)
> You should report this to Ubuntu, I suspect a build problem there,
> eventually enabling zstd compression for gfortran-10 but zlib compression
> for gcc-10-offload-nvptx (I'm not sure we inter-operate here - Martin?)

Yes, I bet one of the compilers does not have enabled ZSTD compression.
You can see it with gcc -v:

$ gcc -v
...
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200310 (experimental) (GCC) 

Right now we should catch different compression algorithm:

void
lto_end_uncompression (struct lto_compression_stream *stream,
   lto_compression compression)
{
#ifdef HAVE_ZSTD_H
  if (compression == ZSTD)
{
  lto_uncompression_zstd (stream);
  return;
}
#endif
  if (compression == ZSTD)
internal_error ("compiler does not support ZSTD LTO compression");

  lto_uncompression_zlib (stream);
}

[Bug fortran/94129] Using almost any openacc !$acc directive causes ICE "compressed stream: data error"

2020-03-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94129

Richard Biener  changed:

   What|Removed |Added

   Keywords||openacc
 CC||doko at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
You should report this to Ubuntu, I suspect a build problem there, eventually
enabling zstd compression for gfortran-10 but zlib compression for
gcc-10-offload-nvptx (I'm not sure we inter-operate here - Martin?)