[Bug bootstrap/91352] [10 Regression] Jobserver detection uses fcntl, which is not available on mingw-w64

2019-08-06 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91352

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 CC||mateuszb at poczta dot onet.pl

--- Comment #3 from mateuszb at poczta dot onet.pl ---
Now the error is:
/home/ma/m/cross/bin/i686-w64-mingw32-g++ -fno-PIE -c   -pipe -O2 -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
-I/home/ma/m/source/gcc-10/gcc -I/home/ma/m/source/gcc-10/gcc/.
-I/home/ma/m/source/gcc-10/gcc/../include
-I/home/ma/m/source/gcc-10/gcc/../libcpp/include
-I/home/ma/m/build/for_target/include -I/home/ma/m/build/for_target/include
-I/home/ma/m/build/for_target/include 
-I/home/ma/m/source/gcc-10/gcc/../libdecnumber
-I/home/ma/m/source/gcc-10/gcc/../libdecnumber/bid -I../libdecnumber
-I/home/ma/m/source/gcc-10/gcc/../libbacktrace
-I/home/ma/m/build/for_target/include  -o lto-wrapper.o -MT lto-wrapper.o -MMD
-MP -MF ./.deps/lto-wrapper.TPo /home/ma/m/source/gcc-10/gcc/lto-wrapper.c
/home/ma/m/source/gcc-10/gcc/lto-wrapper.c: In function 'bool fd_exists(int)':
/home/ma/m/source/gcc-10/gcc/lto-wrapper.c:1228:3: error: 'HANDLE' was not
declared in this scope
 1228 |   HANDLE h = (HANDLE) _get_osfhandle (fd);
  |   ^~
/home/ma/m/source/gcc-10/gcc/lto-wrapper.c:1229:10: error: 'h' was not declared
in this scope
 1229 |   return h != (HANDLE) -1;
  |  ^
/home/ma/m/source/gcc-10/gcc/lto-wrapper.c:1223:16: warning: unused parameter
'fd' [-Wunused-parameter]
 1223 | fd_exists (int fd)
  |^~
Makefile:1118: recipe for target 'lto-wrapper.o' failed
make[2]: *** [lto-wrapper.o] Error 1

[Bug rtl-optimization/88331] [9 Regression] ICE in rtl_verify_bb_layout, at cfgrtl.c:2987

2019-01-08 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331

--- Comment #14 from mateuszb at poczta dot onet.pl ---
The patch from comment #13 solve my problems. Thanks!

[Bug target/85667] (x86_64) ms_abi rules aren't followed when returning short structs with float values

2019-01-07 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85667

--- Comment #6 from mateuszb at poczta dot onet.pl ---
Now it is fixed for 64-bit GCC 9.
For 32-bit GCC 9 it is not fixed (return goes to st(0)).

[Bug target/85667] (x86_64) ms_abi rules aren't followed when returning short structs with float values

2018-12-19 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85667

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 CC||mateuszb at poczta dot onet.pl

--- Comment #4 from mateuszb at poczta dot onet.pl ---
Now gcc 9 is heavily broken for mingw-w64 target -- so it is not fixed.
Functions that returns float or double should return in xmm0 (not eax).

In gcc-9 source code there are some hints:
gcc/config/i386/cygming.h from line #400:
/* MSVC returns aggregate types of up to 8 bytes via registers.
   See i386.c:ix86_return_in_memory.  */
#undef MS_AGGREGATE_RETURN
#define MS_AGGREGATE_RETURN 1

I think we should check if type is aggregate before we return in eax and leave
xmm0 for float and double, for example:
Index: gcc/config/i386/i386.c
===
--- gcc/config/i386/i386.c  (revision 267268)
+++ gcc/config/i386/i386.c  (working copy)
@@ -9063,6 +9063,13 @@
  && !COMPLEX_MODE_P (mode))
regno = FIRST_SSE_REG;
  break;
+   case 8:
+   case 4:
+ if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+   break;
+ if (mode == SFmode || mode == DFmode)
+   regno = FIRST_SSE_REG;
+ break;
default:
  break;
 }

[Bug c++/88521] gcc 9.0 from r266355 miscompile x265 for mingw-w64 target

2018-12-18 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88521

--- Comment #8 from mateuszb at poczta dot onet.pl ---
My proposition is:

Index: gcc/config/i386/i386.c
===
--- gcc/config/i386/i386.c  (revision 267245)
+++ gcc/config/i386/i386.c  (working copy)
@@ -9063,6 +9063,13 @@
  && !COMPLEX_MODE_P (mode))
regno = FIRST_SSE_REG;
  break;
+   case 8:
+   case 4:
+ if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+   break;
+ if (mode == SFmode || mode == DFmode)
+   regno = FIRST_SSE_REG;
+ break;
default:
  break;
 }

which gives:

$ cat t.c
float fun1(void)
{
return 4.14f;
}

typedef struct {float x;} Float;

Float fun2(void)
{
Float v;
v.x = 4.14f;
return v;
}

Mateusz@Mateusz-i7 /c/temp
$ gcc -c -O2 -o t.o t.c

Mateusz@Mateusz-i7 /c/temp
$ objdump -dr t.o

t.o: file format pe-x86-64


Disassembly of section .text:

 :
   0:   f3 0f 10 05 00 00 00movss  0x0(%rip),%xmm0# 8 
   7:   00
4: R_X86_64_PC32.rdata
   8:   c3  retq
   9:   0f 1f 80 00 00 00 00nopl   0x0(%rax)

0010 :
  10:   8b 05 00 00 00 00   mov0x0(%rip),%eax# 16 
12: R_X86_64_PC32   .rdata
  16:   c3  retq
  17:   90  nop
  18:   90  nop
  19:   90  nop
  1a:   90  nop
  1b:   90  nop
  1c:   90  nop
  1d:   90  nop
  1e:   90  nop
  1f:   90  nop

[Bug c++/88521] gcc 9.0 from r266355 miscompile x265 for mingw-w64 target

2018-12-17 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88521

--- Comment #7 from mateuszb at poczta dot onet.pl ---
W dniu 17.12.2018 o 13:52, umesh.kalappa0 at gmail dot com pisze:
> mateuszb,
> Please can you provide us the sample file to investigate more on this .

I'm not assembly expert, but this looks to me as a bug:
$ cat t.c
float fun1(void)
{
return 4.14f;
}
Mateusz@Mateusz-i7 /c/temp
$ gcc -c -O2 -o t354.o t.c

Mateusz@Mateusz-i7 /c/temp
$ objdump -d t354.o

t354.o: file format pe-x86-64


Disassembly of section .text:

 :
   0:   f3 0f 10 05 00 00 00movss  0x0(%rip),%xmm0# 8 
   7:   00
   8:   c3  retq
   9:   90  nop
   a:   90  nop
   b:   90  nop
   c:   90  nop
   d:   90  nop
   e:   90  nop
   f:   90  nop

Mateusz@Mateusz-i7 /c/temp
$ m64- 355

Mateusz@Mateusz-i7 /c/temp
$ gcc -c -O2 -o t355.o t.c

Mateusz@Mateusz-i7 /c/temp
$ objdump -d t355.o

t355.o: file format pe-x86-64


Disassembly of section .text:

 :
   0:   8b 05 00 00 00 00   mov0x0(%rip),%eax# 6 
   6:   c3  retq
   7:   90  nop
   8:   90  nop
   9:   90  nop
   a:   90  nop
   b:   90  nop
   c:   90  nop
   d:   90  nop
   e:   90  nop
   f:   90  nop

This patch is really intended to change abi for float return (without struct)?

[Bug c++/88521] gcc 9.0 from r266355 miscompile x265 for mingw-w64 target

2018-12-17 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88521

--- Comment #6 from mateuszb at poczta dot onet.pl ---
W dniu 17.12.2018 o 10:20, rguenth at gcc dot gnu.org pisze:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88521
> 
> --- Comment #2 from Richard Biener  ---
> Since the patch changes the ABI can it be you have library dependences with 
> the
> old ABI around?

I have 2 GCC binaries compiled from sources -- r266354 and r266355.
If I compile x265 by old GCC (266354), next delete x265.exe, replace compiler
by new GCC (266355) and execute 'make' -- it will be x265.exe that is compiled
by old GCC and linked by new GCC (x265o-n.exe).
x265n-o.exe is x265 compiled by new GCC and linked by old GCC,
x265o.exe -- x265 compiled and linked by old GCC,
x265n.exe -- x265 compiled and linked by new GCC.
Encoding results (--crf 20 --no-asm):
x265o.exe -- encoded 600 frames in 104.10s (5.76 fps), 4187.99 kb/s, Avg
QP:25.15
x265n.exe -- encoded 600 frames in 94.14s (6.37 fps), 4670.69 kb/s, Avg
QP:43.14
x265o-n.exe -- encoded 600 frames in 58.90s (10.19 fps), 112.00 kb/s, Avg
QP:51.00
x265n-o.exe -- encoded 600 frames in 241.80s (2.48 fps), 238059.27 kb/s, Avg
QP:0.00

It is quite possible that the problem is in mingw-w64 code that uses ASM or
inline ASM and assume old GCC behavior. The movie produced by x265n-o.exe is
not lossless but the quality is really OK (almost impossible with wrong
compiler).

I will try to dig deeper...

[Bug c++/88521] gcc 9.0 from r266355 miscompile x265 for mingw-w64 target

2018-12-17 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88521

--- Comment #5 from mateuszb at poczta dot onet.pl ---
W dniu 17.12.2018 o 13:52, umesh.kalappa0 at gmail dot com pisze:
> mateuszb,
> Please can you provide us the sample file to investigate more on this .

OK, after work I will investigate more and post back the results.

[Bug c++/88521] New: gcc 9.0 from r266355 miscompile x265 for mingw-w64 target

2018-12-16 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88521

Bug ID: 88521
   Summary: gcc 9.0 from r266355 miscompile x265 for mingw-w64
target
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---
Target: mingw-w64

x265 compiled by gcc 9.0 r266355 (or newer) for mingw-w64 makes wrong encoding
(awful quality).

Comparison of encoding by x265 compiled by gcc 9.0 r266354 vs. r266355 (see
bitrate and Avg QP):
f:\speed\2.9+15>x265r354 --crf 20 --no-asm
../Bosphorus_1920x1080_120fps_420_8bit_YUV.y4m w1.hevc && x265r355 --crf 20
--no-asm ../Bosphorus_1920x1080_120fps_420_8bit_YUV.y4m w2.hevc
y4m  [info]: 1920x1080 fps 30/1 i420p8 frames 0 - 599 of 600
raw  [info]: output file: w1.hevc
x265 [info]: HEVC encoder version 2.9+16-c829b5b75a9f
x265 [info]: build info [Windows][GCC 9.0.0][64 bit] 10bit
x265 [info]: using cpu capabilities: none!
x265 [info]: Main 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices  : 1
x265 [info]: frame threads / pool features   : 3 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt: 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb   : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress: CRF-20.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock sao
x265 [info]: frame I:  3, Avg QP:19.68  kb/s: 32315.52
x265 [info]: frame P:148, Avg QP:21.03  kb/s: 12782.31
x265 [info]: frame B:449, Avg QP:26.54  kb/s: 1167.18
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 0.7% 0.7% 0.7% 96.7% 1.3%

encoded 600 frames in 113.81s (5.27 fps), 4187.99 kb/s, Avg QP:25.15
y4m  [info]: 1920x1080 fps 30/1 i420p8 frames 0 - 599 of 600
raw  [info]: output file: w2.hevc
x265 [info]: HEVC encoder version 2.9+16-c829b5b75a9f
x265 [info]: build info [Windows][GCC 9.0.0][64 bit] 10bit
x265 [info]: using cpu capabilities: none!
x265 [info]: Main 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices  : 1
x265 [info]: frame threads / pool features   : 3 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt: 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb   : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress: CRF-20.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock sao
x265 [info]: frame I:  3, Avg QP:39.68  kb/s: 13494.72
x265 [info]: frame P:148, Avg QP:19.37  kb/s: 18426.52
x265 [info]: frame B:449, Avg QP:51.00  kb/s: 77.51
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 0.7% 0.7% 0.7% 96.7% 1.3%

encoded 600 frames in 103.13s (5.82 fps), 4670.69 kb/s, Avg QP:43.14

[Bug target/88331] ICE in rtl_verify_bb_layout, at cfgrtl.c:2987

2018-12-07 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331

--- Comment #5 from mateuszb at poczta dot onet.pl ---
Bug started with r266345
Both files pixel.ii and slicetype.ii could be compile by gcc 9 r266344 and both
files ICE gcc 9 r266345.

I've attached xz archive with both *.ii files (maybe it helps).

[Bug target/88331] ICE in rtl_verify_bb_layout, at cfgrtl.c:2987

2018-12-03 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331

--- Comment #4 from mateuszb at poczta dot onet.pl ---
W dniu 03.12.2018 o 21:21, pinskia at gcc dot gnu.org pisze:
> --- Comment #1 from Andrew Pinski  ---
> Can you attach the preprocessed source as requested by
> https://gcc.gnu.org/bugs/ ?

Now slicetype.ii (in 7z archive). This bug is newer -- probably from r266726
Step to reproduce:
$ g++ -c -O3 -march=core-avx2 slicetype.ii
f:/x265/source/encoder/slicetype.cpp: In member function 'void
x265_12bit::Lookahead::cuTree(x265_12bit::Lowres**, int, bool)':
f:/x265/source/encoder/slicetype.cpp:2086:1: error: insn outside basic block
 2086 | }
  | ^
(insn 6071 5573 6072 (parallel [
(set (reg:DI 4089)
(plus:DI (reg/f:DI 19 frame)
(const_int -6928 [0xe4f0])))
(clobber (reg:CC 17 flags))
]) 191 {*adddi_1}
 (nil))
during RTL pass: reload
f:/x265/source/encoder/slicetype.cpp:2086:1: internal compiler error: in
rtl_verify_bb_layout, at cfgrtl.c:2987
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug target/88331] ICE in rtl_verify_bb_layout, at cfgrtl.c:2987

2018-12-03 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331

--- Comment #3 from mateuszb at poczta dot onet.pl ---
W dniu 03.12.2018 o 21:21, pinskia at gcc dot gnu.org pisze:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331
> 
> Andrew Pinski  changed:
> 
>What|Removed |Added
> 
>  Target||x86_64-w64-mingw32
>   Component|c++ |target
> 
> --- Comment #1 from Andrew Pinski  ---
> Can you attach the preprocessed source as requested by
> https://gcc.gnu.org/bugs/ ?

Attachment too big. Second try with 7z archive.

[Bug target/88331] ICE in rtl_verify_bb_layout, at cfgrtl.c:2987

2018-12-03 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331

--- Comment #2 from mateuszb at poczta dot onet.pl ---
W dniu 03.12.2018 o 21:21, pinskia at gcc dot gnu.org pisze:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331
> 
> Andrew Pinski  changed:
> 
>What|Removed |Added
> 
>  Target||x86_64-w64-mingw32
>   Component|c++ |target
> 
> --- Comment #1 from Andrew Pinski  ---
> Can you attach the preprocessed source as requested by
> https://gcc.gnu.org/bugs/ ?

Big *.ii file attached (bug in pixel.cpp).

Reproduce steps:
$ g++ -c -O3 -march=core-avx2 pixel.ii
f:/x265/source/common/pixel.cpp: In function 'int {anonymous}::_sa8d_8x8(const
pixel*, intptr_t, const pixel*, intptr_t)':
f:/x265/source/common/pixel.cpp:325:1: error: insn outside basic block
  325 | }
  | ^
(insn 270 239 271 (parallel [
(set (reg:DI 425)
(plus:DI (reg/f:DI 19 frame)
(const_int -304 [0xfed0])))
(clobber (reg:CC 17 flags))
]) -1
 (nil))
during RTL pass: reload
f:/x265/source/common/pixel.cpp:325:1: internal compiler error: in
rtl_verify_bb_layout, at cfgrtl.c:2987
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug c++/88331] New: ICE in rtl_verify_bb_layout, at cfgrtl.c:2987

2018-12-03 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88331

Bug ID: 88331
   Summary: ICE in rtl_verify_bb_layout, at cfgrtl.c:2987
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

When I compile x265 with option
export CXXFLAGS="-march=core-avx2"
with gcc 9.0 for mingw-w64 target:
g++ -v
Reading specs from
f:/msys/m64-900/bin/../lib/gcc/x86_64-w64-mingw32/9.0.0/specs
COLLECT_GCC=f:\msys\m64-900\bin\g++.exe
COLLECT_LTO_WRAPPER=f:/msys/m64-900/bin/../libexec/gcc/x86_64-w64-mingw32/9.0.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: /home/ma/m/source/gcc-9/configure --host=x86_64-w64-mingw32
--target=x86_64-w64-mingw32 --disable-nls --enable-languages=c,c++,objc,obj-c++
--with-gmp=/home/ma/m/build/for_target --with-mpfr=/home/ma/m/build/for_target
--with-mpc=/home/ma/m/build/for_target --with-isl=/home/ma/m/build/for_target
--enable-twoprocess --disable-libstdcxx-pch --disable-win32-registry
--disable-shared --enable-fully-dynamic-string --prefix=/home/ma/m/target
--with-sysroot=/home/ma/m/target
Thread model: win32
gcc version 9.0.0 20181203 (experimental) (GCC)

I get errors (it depend of what module x265 compile first):
f:/x265/source/encoder/slicetype.cpp: In member function 'void
x265_12bit::Lookahead::cuTree(x265_12bit::Lowres**, int, bool)':
f:/x265/source/encoder/slicetype.cpp:2086:1: error: insn outside basic block
 2086 | }
  | ^
(insn 8402 7720 8403 (parallel [
(set (reg:DI 5536)
(plus:DI (reg/f:DI 19 frame)
(const_int -6896 [0xe510])))
(clobber (reg:CC 17 flags))
]) 191 {*adddi_1}
 (nil))
during RTL pass: reload
f:/x265/source/encoder/slicetype.cpp:2086:1: internal compiler error: in
rtl_verify_bb_layout, at cfgrtl.c:2987
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

*** OR ***

f:/x265/source/common/pixel.cpp: In function 'int {anonymous}::_sa8d_8x8(const
pixel*, intptr_t, const pixel*, intptr_t)':
f:/x265/source/common/pixel.cpp:325:1: error: insn outside basic block
  325 | }
  | ^
(insn 270 239 271 (parallel [
(set (reg:DI 425)
(plus:DI (reg/f:DI 19 frame)
(const_int -304 [0xfed0])))
(clobber (reg:CC 17 flags))
]) -1
 (nil))
during RTL pass: reload
f:/x265/source/common/pixel.cpp:325:1: internal compiler error: in
rtl_verify_bb_layout, at cfgrtl.c:2987
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

gcc 9.0 snapshot 20181118 works OK, next snapshots works wrong.
If this error is not reproducible/obvious, I could try to make preprocessed
source. Anyway the option "-march=core-avx2" is important for the bug.

[Bug libstdc++/87963] New: libstdc++-v3/src/c++17/memory_resource.cc:515:31: error: static assertion failed for mingw-w64 target since r265853

2018-11-09 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87963

Bug ID: 87963
   Summary: libstdc++-v3/src/c++17/memory_resource.cc:515:31:
error: static assertion failed for mingw-w64 target
since r265853
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

When I build cross compiler (trunk) for mingw-w64 x86_64 target (long is
4-bytes, pointer is 8-bytes), there are errors since r265853

libtool: compile:  /home/ma/m/build/bc_gcc/./gcc/xgcc -shared-libgcc
-B/home/ma/m/build/bc_gcc/./gcc -nostdinc++
-L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/src
-L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs
-L/home/ma/m/cross/x86_64-w64-mingw32/lib -L/home/ma/m/cross/mingw/lib -isystem
/home/ma/m/cross/x86_64-w64-mingw32/include -isystem
/home/ma/m/cross/mingw/include -B/home/ma/m/cross/x86_64-w64-mingw32/bin/
-B/home/ma/m/cross/x86_64-w64-mingw32/lib/ -isystem
/home/ma/m/cross/x86_64-w64-mingw32/include -isystem
/home/ma/m/cross/x86_64-w64-mingw32/sys-include
-I/home/ma/m/source/gcc-9/libstdc++-v3/../libgcc
-I/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/include
-I/home/ma/m/source/gcc-9/libstdc++-v3/libsupc++ -std=gnu++17
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=memory_resource.lo -g -O2 -fimplicit-templates -c
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc -o
memory_resource.o
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:515:31:
error: static assertion failed
  515 |   static_assert(sizeof(chunk) == (4 * sizeof(void*)), "");
  | ~~^~
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:526:48:
warning: left shift count >= width of type [-Wshift-count-overflow]
  526 | static constexpr size_t all_ones = (1ul << _S_sizebits) - 1u;
  |^~~
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:526:45:
error: right operand of shift expression '(1 << 58)' is >= than the precision
of the left operand [-fpermissive]
  526 | static constexpr size_t all_ones = (1ul << _S_sizebits) - 1u;
  |~^~~
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc: In member
function 'std::size_t std::pmr::{anonymous}::big_block::size() const':
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:548:5:
warning: control reaches end of non-void function [-Wreturn-type]
  548 | }
  | ^
Makefile:735: recipe for target 'memory_resource.lo' failed
make[4]: *** [memory_resource.lo] Error 1

[Bug libstdc++/86447] gcc 9.0 from r262456 can't build cross compiler for mingw-w64 target

2018-08-16 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86447

--- Comment #1 from mateuszb at poczta dot onet.pl ---
This bug is when you configure GCC with option
--enable-fully-dynamic-string

[Bug libstdc++/86447] New: gcc 9.0 from r262456 can't build cross compiler for mingw-w64 target

2018-07-09 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86447

Bug ID: 86447
   Summary: gcc 9.0 from r262456 can't build cross compiler for
mingw-w64 target
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---
Target: mingw-w64

>From r262456 when I compile cross compiler (in Ubuntu) for mingw-w64 target
there is a bug:

libtool: compile:  /home/ma/m/build/bc_gcc/./gcc/xgcc -shared-libgcc
-B/home/ma/m/build/bc_gcc/./gcc -nostdinc++
-L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/src
-L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs
-L/home/ma/m/cross/x86_64-w64-mingw32/lib -L/home/ma/m/cross/mingw/lib -isystem
/home/ma/m/cross/x86_64-w64-mingw32/include -isystem
/home/ma/m/cross/mingw/include -B/home/ma/m/cross/x86_64-w64-mingw32/bin/
-B/home/ma/m/cross/x86_64-w64-mingw32/lib/ -isystem
/home/ma/m/cross/x86_64-w64-mingw32/include -isystem
/home/ma/m/cross/x86_64-w64-mingw32/sys-include
-I/home/ma/m/source/gcc-9/libstdc++-v3/../libgcc
-I/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/include
-I/home/ma/m/source/gcc-9/libstdc++-v3/libsupc++ -std=gnu++11
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=cow-stdexcept.lo -g -O2 -c
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++11/cow-stdexcept.cc -o
cow-stdexcept.o
cc1plus: warning: -Wabi won't warn about anything [-Wabi]
cc1plus: note: -Wabi warns about differences from the most up-to-date ABI,
which is also used by default
cc1plus: note: use e.g. -Wabi=11 to warn about changes from GCC 7
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++11/cow-stdexcept.cc:67:3: error:
function 'std::logic_error::logic_error(std::logic_error&&)' defaulted on its
redeclaration with an exception-specification that differs from the implicit
exception-specification ''
   logic_error::logic_error(logic_error&& e) noexcept = default;
   ^~~
/home/ma/m/source/gcc-9/libstdc++-v3/src/c++11/cow-stdexcept.cc:79:3: error:
function 'std::runtime_error::runtime_error(std::runtime_error&&)' defaulted on
its redeclaration with an exception-specification that differs from the
implicit exception-specification ''
   runtime_error::runtime_error(runtime_error&& e) noexcept = default;
   ^
Makefile:562: recipe for target 'cow-stdexcept.lo' failed
make[5]: *** [cow-stdexcept.lo] Error 1

The bug is in phase when new compiled gcc is trying to compile libraries.

[Bug target/86399] New: gcc 9.0 from r262251 can't be build for Windows/mingw-w64 target

2018-07-04 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86399

Bug ID: 86399
   Summary: gcc 9.0 from r262251 can't be build for
Windows/mingw-w64 target
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

In r262251 it was changed file "gcc/coverage.c":
+#if HAVE_DOS_BASED_FILE_SYSTEM
+ const char separator = "\\";
+#else
+ const char *separator = "/";
+#endif

For Windows/mingw-w64 target it should be *separator instead of separator,
tested patch:
--- gcc/coverage.c  (revision 262370)
+++ gcc/coverage.c  (working copy)
@@ -1227,7 +1227,7 @@
   if (profile_data_prefix)
{
 #if HAVE_DOS_BASED_FILE_SYSTEM
- const char separator = "\\";
+ const char *separator = "\\";
 #else
  const char *separator = "/";
 #endif

[Bug target/83635] [8 Regression] Cygwin build error: i386.c

2017-12-31 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83635

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 CC||mateuszb at poczta dot onet.pl

--- Comment #1 from mateuszb at poczta dot onet.pl ---
It is bug #83536, patch is quite simple:

Index: gcc/config/i386/i386.c
===
--- gcc/config/i386/i386.c  (revision 256045)
+++ gcc/config/i386/i386.c  (working copy)
@@ -44747,7 +44747,7 @@
   { "dllexport", 0, 0, false, false, false, false, handle_dll_attribute,
 NULL },
   { "shared",0, 0, true,  false, false, false,
-ix86_handle_shared_attribute, false, NULL },
+ix86_handle_shared_attribute, NULL },
 #endif
   { "ms_struct", 0, 0, false, false,  false, false,
 ix86_handle_struct_attribute, NULL },

[Bug target/83536] One 'false' too much in r255699 for mingw target (in config/i386/i386.c)

2017-12-21 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83536

--- Comment #2 from mateuszb at poczta dot onet.pl ---
Yes, I agree.

The 80-chars width limit was also significant in this case -- instead of
writing code you must fight with too long lines. I think that there is the time
to change this limit to 130 chars (for example).

[Bug target/83536] New: One 'false' too much in r255699 for mingw target (in config/i386/i386.c)

2017-12-21 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83536

Bug ID: 83536
   Summary: One 'false' too much in r255699 for mingw target (in
config/i386/i386.c)
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

Copy from Jakub Jelinek [PATCH] Swap affects_type_identity and handler fields
in attribute_spec [r255699] config/i386/i386.c:
 #if TARGET_DLLIMPORT_DECL_ATTRIBUTES
-  { "dllimport", 0, 0, false, false, false, handle_dll_attribute, false, NULL
},
-  { "dllexport", 0, 0, false, false, false, handle_dll_attribute, false, NULL
},
-  { "shared",0, 0, true,  false, false, ix86_handle_shared_attribute,
-false, NULL },
+  { "dllimport", 0, 0, false, false, false, false, handle_dll_attribute,
+NULL },
+  { "dllexport", 0, 0, false, false, false, false, handle_dll_attribute,
+NULL },
+  { "shared",0, 0, true,  false, false, false,
+ix86_handle_shared_attribute, false, NULL },
 #endif

Please look at new "shared" -- 'false' is copied to front but not deleted from
old position. This breaks build for mingw target.

[Bug target/82651] After r253879 GCC 8.0 can't build cross compiler for mingw32

2017-10-30 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82651

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from mateuszb at poczta dot onet.pl ---
Fixed in r254211. Thanks!

[Bug bootstrap/82651] New: After -r 253879 GCC 8.0 can't build cross compiler for mingw32

2017-10-21 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82651

Bug ID: 82651
   Summary: After -r 253879 GCC 8.0 can't build cross compiler for
mingw32
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

-r 253878 works OK (for mingw32), -r 253879 breaks build cross compiler with
error:

g++ -fno-PIE -c   -pipe -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/ma/m/source/gcc-8/gcc
-I/home/ma/m/source/gcc-8/gcc/. -I/home/ma/m/source/gcc-8/gcc/../include
-I/home/ma/m/source/gcc-8/gcc/../libcpp/include
-I/home/ma/m/build/for_cross/include -I/home/ma/m/build/for_cross/include
-I/home/ma/m/build/for_cross/include 
-I/home/ma/m/source/gcc-8/gcc/../libdecnumber
-I/home/ma/m/source/gcc-8/gcc/../libdecnumber/bid -I../libdecnumber
-I/home/ma/m/source/gcc-8/gcc/../libbacktrace
-I/home/ma/m/build/for_cross/include  -o gimplify.o -MT gimplify.o -MMD -MP -MF
./.deps/gimplify.TPo /home/ma/m/source/gcc-8/gcc/gimplify.c
In file included from ./tm.h:20:0,
 from /home/ma/m/source/gcc-8/gcc/backend.h:28,
 from /home/ma/m/source/gcc-8/gcc/gimplify.c:26:
/home/ma/m/source/gcc-8/gcc/gimplify.c: In function ‘gimplify_status
gimplify_decl_expr(tree_node**, gimple**)’:
/home/ma/m/source/gcc-8/gcc/config/i386/i386.h:609:61: error: ‘ix86_cfun_abi’
was not declared in this scope
 #define TARGET_64BIT_MS_ABI (TARGET_64BIT && ix86_cfun_abi () == MS_ABI)
 ^
/home/ma/m/source/gcc-8/gcc/config/i386/cygming.h:35:22: note: in expansion of
macro ‘TARGET_64BIT_MS_ABI’
 #define TARGET_SEH  (TARGET_64BIT_MS_ABI && flag_unwind_tables)
  ^
/home/ma/m/source/gcc-8/gcc/config/i386/cygming.h:40:31: note: in expansion of
macro ‘TARGET_SEH’
 #define MAX_STACK_ALIGNMENT  (TARGET_SEH ? 128 : MAX_OFILE_ALIGNMENT)
   ^
/home/ma/m/source/gcc-8/gcc/defaults.h:1142:39: note: in expansion of macro
‘MAX_STACK_ALIGNMENT’
 #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
   ^
/home/ma/m/source/gcc-8/gcc/gimplify.c:1659:28: note: in expansion of macro
‘MAX_SUPPORTED_STACK_ALIGNMENT’
&& DECL_ALIGN (decl) <= MAX_SUPPORTED_STACK_ALIGNMENT
^
/home/ma/m/source/gcc-8/gcc/gimplify.c: In function ‘gimplify_status
gimplify_target_expr(tree_node**, gimple**, gimple**)’:
/home/ma/m/source/gcc-8/gcc/config/i386/i386.h:609:61: error: ‘ix86_cfun_abi’
was not declared in this scope
 #define TARGET_64BIT_MS_ABI (TARGET_64BIT && ix86_cfun_abi () == MS_ABI)
 ^
/home/ma/m/source/gcc-8/gcc/config/i386/cygming.h:35:22: note: in expansion of
macro ‘TARGET_64BIT_MS_ABI’
 #define TARGET_SEH  (TARGET_64BIT_MS_ABI && flag_unwind_tables)
  ^
/home/ma/m/source/gcc-8/gcc/config/i386/cygming.h:40:31: note: in expansion of
macro ‘TARGET_SEH’
 #define MAX_STACK_ALIGNMENT  (TARGET_SEH ? 128 : MAX_OFILE_ALIGNMENT)
   ^
/home/ma/m/source/gcc-8/gcc/defaults.h:1142:39: note: in expansion of macro
‘MAX_STACK_ALIGNMENT’
 #define MAX_SUPPORTED_STACK_ALIGNMENT MAX_STACK_ALIGNMENT
   ^
/home/ma/m/source/gcc-8/gcc/gimplify.c:6510:32: note: in expansion of macro
‘MAX_SUPPORTED_STACK_ALIGNMENT’
&& DECL_ALIGN (temp) <= MAX_SUPPORTED_STACK_ALIGNMENT
^
Makefile:1104: recipe for target 'gimplify.o' failed
make[1]: *** [gimplify.o] Error 1
make[1]: Leaving directory '/home/ma/m/build/bc_gcc/gcc'
Makefile:4285: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2

[Bug bootstrap/82548] After -r 253646 GCC 8.0 can't build cross compiler for mingw32

2017-10-14 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82548

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from mateuszb at poczta dot onet.pl ---
Thanks for fix!

[Bug bootstrap/82548] New: After -r 253646 GCC 8.0 can't build cross compiler for mingw32

2017-10-13 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82548

Bug ID: 82548
   Summary: After -r 253646 GCC 8.0 can't build cross compiler for
mingw32
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

-r 253645 works OK (for mingw32), -r 253646 breaks build cross compiler with
error:

g++ -no-pie   -pipe -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common 
-DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o cc1 c/c-lang.o
c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o
c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o
c/c-array-notation.o c/c-fold.o c/gimple-parser.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o c-family/c-cilkplus.o c-family/array-notation-common.o
c-family/cilk.o c-family/c-ubsan.o c-family/c-attribs.o c-family/c-warn.o
i386-c.o winnt-c.o msformat-c.o \
  cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a 
-L/home/ma/m/build/for_cross/lib -lisl -L/home/ma/m/build/for_cross/lib
-L/home/ma/m/build/for_cross/lib -L/home/ma/m/build/for_cross/lib -lmpc -lmpfr
-lgmp -rdynamic -ldl  -L./../zlib -lz
i386.o: In function `ix86_sched_init_global(_IO_FILE*, int, int)':
i386.c:(.text+0xb5f1): undefined reference to `ix86_core2i7_init_hooks()'
i386.o:(.data+0x258): undefined reference to `ix86_adjust_cost(rtx_insn*, int,
rtx_insn*, int, unsigned int)'
i386.o:(.data+0x268): undefined reference to `ix86_issue_rate()'
i386.o:(.data+0x298): undefined reference to
`ix86_atom_sched_reorder(_IO_FILE*, int, rtx_insn**, int*, int)'
i386.o:(.data+0x2a8): undefined reference to `ix86_macro_fusion_p()'
i386.o:(.data+0x2b0): undefined reference to
`ix86_macro_fusion_pair_p(rtx_insn*, rtx_insn*)'
i386.o:(.data+0x2f0): undefined reference to `ia32_multipass_dfa_lookahead()'
i386.o:(.data+0x3b8): undefined reference to `ix86_bd_do_dispatch(rtx_insn*,
int)'
i386.o:(.data+0x3c0): undefined reference to `ix86_bd_has_dispatch(rtx_insn*,
int)'
insn-automata.o: In function `insn_latency(rtx_insn*, rtx_insn*)':
insn-automata.c:(.text+0x66cf): undefined reference to
`ix86_agi_dependent(rtx_insn*, rtx_insn*)'
insn-automata.c:(.text+0x6735): undefined reference to
`ix86_agi_dependent(rtx_insn*, rtx_insn*)'
insn-automata.c:(.text+0x6759): undefined reference to
`ix86_agi_dependent(rtx_insn*, rtx_insn*)'
insn-automata.c:(.text+0x6781): undefined reference to
`ix86_agi_dependent(rtx_insn*, rtx_insn*)'
insn-automata.c:(.text+0x6aac): undefined reference to
`ix86_agi_dependent(rtx_insn*, rtx_insn*)'
insn-automata.o:insn-automata.c:(.text+0x6ac4): more undefined references to
`ix86_agi_dependent(rtx_insn*, rtx_insn*)' follow
collect2: error: ld returned 1 exit status
/home/ma/m/source/gcc-8/gcc/c/Make-lang.in:85: recipe for target 'cc1' failed
make[1]: *** [cc1] Error 1
make[1]: Leaving directory '/home/ma/m/build/bc_gcc/gcc'
Makefile:4285: recipe for target 'all-gcc' failed
make: *** [all-gcc] Error 2

[Bug c++/82154] ICE in fold_binary_loc, at fold-const.c:9088 in 32-bit mingw32

2017-09-11 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82154

--- Comment #2 from mateuszb at poczta dot onet.pl ---
W dniu 2017-09-11 o 09:14, marxin at gcc dot gnu.org pisze:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82154
> 
> Martin Liška  changed:
> 
>What|Removed |Added
> 
>  Status|UNCONFIRMED |WAITING
>Last reconfirmed||2017-09-11
>  CC||marxin at gcc dot gnu.org
>  Ever confirmed|0   |1
> 
> --- Comment #1 from Martin Liška  ---
> Please attach pre-processed source code so that I can test it with cross
> compiler.
> 

Cmd line:
ma@ma-VirtualBox:~/m$ /home/ma/m/build/bc_gcc/./gcc/xgcc -shared-libgcc
-B/home/ma/m/build/bc_gcc/./gcc -nostdinc++
-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src
-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src/.libs
-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/libsupc++/.libs
-L/home/ma/m/cross/i686-w64-mingw32/lib -L/home/ma/m/cross/mingw/lib -isystem
/home/ma/m/cross/i686-w64-mingw32/include -isystem
/home/ma/m/cross/mingw/include -B/home/ma/m/cross/i686-w64-mingw32/bin/
-B/home/ma/m/cross/i686-w64-mingw32/lib/ -isystem
/home/ma/m/cross/i686-w64-mingw32/include -isystem
/home/ma/m/cross/i686-w64-mingw32/sys-include
-I/home/ma/m/source/gcc-8/libstdc++-v3/../libgcc
-I/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32
-I/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include
-I/home/ma/m/source/gcc-8/libstdc++-v3/libsupc++ -std=gnu++98
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=bitmap_allocator.lo -v -save-temps -g -O2 -c
/home/ma/m/source/gcc-8/libstdc++-v3/src/c++98/bitmap_allocator.cc -o
bitmap_allocator.o
Reading specs from /home/ma/m/build/bc_gcc/./gcc/specs
COLLECT_GCC=/home/ma/m/build/bc_gcc/./gcc/xgcc
Target: i686-w64-mingw32
Configured with: /home/ma/m/source/gcc-8/configure --target=i686-w64-mingw32
--disable-nls --disable-multilib --with-gmp=/home/ma/m/build/for_cross
--with-mpfr=/home/ma/m/build/for_cross --with-mpc=/home/ma/m/build/for_cross
--with-isl=/home/ma/m/build/for_cross --enable-languages=c,c++,objc,obj-c++
--disable-libstdcxx-pch --disable-shared --enable-fully-dynamic-string
--prefix=/home/ma/m/cross --with-sysroot=/home/ma/m/cross
Thread model: win32
gcc version 8.0.0 20170911 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-shared-libgcc' '-B' '/home/ma/m/build/bc_gcc/./gcc'
'-nostdinc++' '-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src'
'-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src/.libs'
'-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/libsupc++/.libs'
'-L/home/ma/m/cross/i686-w64-mingw32/lib' '-L/home/ma/m/cross/mingw/lib'
'-isystem' '/home/ma/m/cross/i686-w64-mingw32/include' '-isystem'
'/home/ma/m/cross/mingw/include' '-B' '/home/ma/m/cross/i686-w64-mingw32/bin/'
'-B' '/home/ma/m/cross/i686-w64-mingw32/lib/' '-isystem'
'/home/ma/m/cross/i686-w64-mingw32/include' '-isystem'
'/home/ma/m/cross/i686-w64-mingw32/sys-include' '-I'
'/home/ma/m/source/gcc-8/libstdc++-v3/../libgcc' '-I'
'/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32'
'-I' '/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include' '-I'
'/home/ma/m/source/gcc-8/libstdc++-v3/libsupc++' '-std=gnu++98'
'-fno-implicit-templates' '-Wall' '-Wextra' '-Wwrite-strings' '-Wcast-qual'
'-Wabi' '-fdiagnostics-show-location=once' '-ffunction-sections'
'-fdata-sections' '-frandom-seed=bitmap_allocator.lo' '-v' '-save-temps' '-g'
'-O2' '-c' '-o' 'bitmap_allocator.o' '-mtune=generic' '-march=pentiumpro'
 /home/ma/m/build/bc_gcc/./gcc/cc1plus -E -quiet -nostdinc++ -v -I
/home/ma/m/source/gcc-8/libstdc++-v3/../libgcc -I
/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32
-I /home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include -I
/home/ma/m/source/gcc-8/libstdc++-v3/libsupc++ -iprefix
/home/ma/m/build/bc_gcc/gcc/../lib/gcc/i686-w64-mingw32/8.0.0/ -isystem
/home/ma/m/build/bc_gcc/./gcc/include -isystem
/home/ma/m/build/bc_gcc/./gcc/include-fixed -U_REENTRANT -isystem
/home/ma/m/cross/i686-w64-mingw32/include -isystem
/home/ma/m/cross/mingw/include -isystem
/home/ma/m/cross/i686-w64-mingw32/include -isystem
/home/ma/m/cross/i686-w64-mingw32/sys-include
/home/ma/m/source/gcc-8/libstdc++-v3/src/c++98/bitmap_allocator.cc
-mtune=generic -march=pentiumpro -std=gnu++98 -Wall -Wextra -Wwrite-strings
-Wcast-qual -Wabi -fno-implicit-templates -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -frandom-seed=bitmap_allocator.lo -g
-fworking-directory -O2 -fpch-preprocess -o bitmap_allocator.ii
ignoring duplicate directory "/home/ma/m

[Bug c++/82154] New: ICE in fold_binary_loc, at fold-const.c:9088 in 32-bit mingw32

2017-09-08 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82154

Bug ID: 82154
   Summary: ICE in fold_binary_loc, at fold-const.c:9088 in 32-bit
mingw32
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

When I compile 32-bit cross compiler GCC 8.0 [r251909] in 64-bit Ubuntu 16.04
for mingw32 there is an error (64-bit GCC 8.0 works OK, problem only with
32-bit):

libtool: compile:  /home/ma/m/build/bc_gcc/./gcc/xgcc -shared-libgcc
-B/home/ma/m/build/bc_gcc/./gcc -nostdinc++
-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src
-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src/.libs
-L/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/libsupc++/.libs
-L/home/ma/m/cross/i686-w64-mingw32/lib -L/home/ma/m/cross/mingw/lib -isystem
/home/ma/m/cross/i686-w64-mingw32/include -isystem
/home/ma/m/cross/mingw/include -B/home/ma/m/cross/i686-w64-mingw32/bin/
-B/home/ma/m/cross/i686-w64-mingw32/lib/ -isystem
/home/ma/m/cross/i686-w64-mingw32/include -isystem
/home/ma/m/cross/i686-w64-mingw32/sys-include
-I/home/ma/m/source/gcc-8/libstdc++-v3/../libgcc
-I/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32
-I/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include
-I/home/ma/m/source/gcc-8/libstdc++-v3/libsupc++ -std=gnu++98
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=bitmap_allocator.lo -g -O2 -c
/home/ma/m/source/gcc-8/libstdc++-v3/src/c++98/bitmap_allocator.cc -o
bitmap_allocator.o
during RTL pass: expand
In file included from
/home/ma/m/source/gcc-8/libstdc++-v3/src/c++98/bitmap_allocator.cc:25:0:
/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include/ext/bitmap_allocator.h:
In member function 'void
__gnu_cxx::bitmap_allocator<_Tp>::_M_deallocate_single_object(__gnu_cxx::bitmap_allocator<_Tp>::pointer)
[with _Tp = char]':
/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/include/ext/bitmap_allocator.h:996:7:
internal compiler error: in fold_binary_loc, at fold-const.c:9088
   }
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Makefile:565: recipe for target 'bitmap_allocator.lo' failed
make[5]: *** [bitmap_allocator.lo] Error 1
make[5]: Leaving directory
'/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src/c++98'
Makefile:641: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
'/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3/src'
Makefile:510: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
'/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3'
Makefile:417: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/home/ma/m/build/bc_gcc/i686-w64-mingw32/libstdc++-v3'
Makefile:10894: recipe for target 'all-target-libstdc++-v3' failed
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory '/home/ma/m/build/bc_gcc'
Makefile:903: recipe for target 'all' failed
make: *** [all] Error 2

[Bug target/81521] [8 Regression] After [r250413] GCC 8.0 doesn't compile for Windows

2017-07-25 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81521

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from mateuszb at poczta dot onet.pl ---
Thanks Jakub and Jim! It is fixed now.

[Bug target/81521] [8 Regression] After [r250413] GCC 8.0 doesn't compile for Windows

2017-07-24 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81521

--- Comment #3 from mateuszb at poczta dot onet.pl ---
Thanks for the patch.
There is left one more TYPE_METHODS in file trunk/gcc/config/i386/winnt-cxx.c
see
https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/i386/winnt-cxx.c?view=markup=250476#l154

Now the bug is:
/home/ma/m/source/gcc-8/gcc/config/i386/winnt-cxx.c: In function ‘void
i386_pe_adjust_class_at_definition(tree)’:
/home/ma/m/source/gcc-8/gcc/config/i386/winnt-cxx.c:154:36: error:
‘TYPE_METHODS’ was not declared in this scope
   for (member = TYPE_METHODS (t); member;  member = DECL_CHAIN (member))
^
/home/ma/m/source/gcc-8/gcc/config/i386/t-cygming:32: recipe for target
'winnt-cxx.o' failed
make[1]: *** [winnt-cxx.o] Error 1

[Bug bootstrap/81521] New: After [r250413] GCC 8.0 doesn't compile for Windows

2017-07-23 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81521

Bug ID: 81521
   Summary: After [r250413] GCC 8.0 doesn't compile for Windows
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mateuszb at poczta dot onet.pl
  Target Milestone: ---

In [r250413] there is a patch Remove TYPE_METHODS. It breaks compiling GCC 8.0
for Windows (mingw-w64).

The bug is:
/home/ma/m/source/gcc-8/gcc/config/i386/winnt-cxx.c: In function ‘void
i386_pe_adjust_class_at_definition(tree)’:
/home/ma/m/source/gcc-8/gcc/config/i386/winnt-cxx.c:123:36: error:
‘TYPE_METHODS’ was not declared in this scope
   for (member = TYPE_METHODS (t); member;  member = DECL_CHAIN (member))
^
/home/ma/m/source/gcc-8/gcc/config/i386/winnt-cxx.c:156:36: error:
‘TYPE_METHODS’ was not declared in this scope
   for (member = TYPE_METHODS (t); member;  member = DECL_CHAIN (member))
^
/home/ma/m/source/gcc-8/gcc/config/i386/t-cygming:32: recipe for target
'winnt-cxx.o' failed
make[1]: *** [winnt-cxx.o] Error 1