[Bug tree-optimization/103089] -Wmaybe-uninitialized -O2 false positive

2021-11-04 Thread xantares09 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103089

xantares09 at hotmail dot com changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from xantares09 at hotmail dot com ---
my bad, thanks for the reply

[Bug tree-optimization/103089] -Wmaybe-uninitialized -O2 false positive

2021-11-04 Thread xantares09 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103089

--- Comment #2 from xantares09 at hotmail dot com ---
indeed, I assumed both were positive, I guess there's no bug then

[Bug c/103089] New: -Wmaybe-uninitialized -O2 false positive

2021-11-04 Thread xantares09 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103089

Bug ID: 103089
   Summary: -Wmaybe-uninitialized -O2 false positive
   Product: gcc
   Version: 11.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: xantares09 at hotmail dot com
  Target Milestone: ---

Created attachment 51736
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51736=edit
minimal reproducer

on this example gcc 11.2, 11.1 gives a false positive for -Wmaybe-uninitialized
(at O2 only)


$ gcc -c -O2 -Wmaybe-uninitialized ks.c
ks.c: In function ‘DurbinMatrix’:
ks.c:21:18: warning: ‘*H_67 + _146’ may be used uninitialized
[-Wmaybe-uninitialized]
   21 |   H[(m - 1) * m] += (2 * h - 1 > 0 ? pow (2 * h - 1, (double) m) : 0);
  |  ^~
ks.c:21:18: warning: ‘*H_67 + _146’ may be used uninitialized
[-Wmaybe-uninitialized]


we can see the whole H array is initialized because H[i * m + j] covers the
whole (0, m*m( range:

H = (double *) malloc ((m * m) * sizeof (double));
  for (i = 0; i < m; i++)
for (j = 0; j < m; j++)
  if (i - j + 1 < 0)
H[i * m + j] = 0;
  else
H[i * m + j] = 1;

[Bug c++/87729] Please include -Woverloaded-virtual in -Wall

2020-08-07 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87729

--- Comment #5 from xantares09 at hotmail dot com ---
still there with 10.1, see attached patch

[Bug c++/87729] Please include -Woverloaded-virtual in -Wall

2020-08-07 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87729

xantares09 at hotmail dot com changed:

   What|Removed |Added

 CC||xantares09 at hotmail dot com

--- Comment #4 from xantares09 at hotmail dot com ---
Created attachment 49021
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49021=edit
enable -Woverloaded-virtual by -Wall

[Bug libbacktrace/95012] [mingw/gcc10.1] mmapio.c:69:14: error: implicit declaration of function ‘getpagesize’

2020-05-10 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95012

--- Comment #3 from xantares09 at hotmail dot com ---
mingw does not define getpagesize as far as I can tell with:
$ grep -nr getpagesize /usr/i686-w64-mingw32/include/

but gcc seems to detect it (9.x and 10.x):
checking for getpagesize... (cached) yes

maybe it relies on its own provided getpagesize function:
gcc/system.h:479:#if defined (HAVE_DECL_GETPAGESIZE) && !HAVE_DECL_GETPAGESIZE
gcc/system.h:480:extern int getpagesize (void);

[Bug libbacktrace/95012] [mingw/gcc10.1] mmapio.c:69:14: error: implicit declaration of function ‘getpagesize’

2020-05-08 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95012

--- Comment #1 from xantares09 at hotmail dot com ---
the full compilation script can be seen here:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mingw-w64-gcc

[Bug libbacktrace/95012] New: [mingw/gcc10.1] mmapio.c:69:14: error: implicit declaration of function ‘getpagesize’

2020-05-08 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95012

Bug ID: 95012
   Summary: [mingw/gcc10.1] mmapio.c:69:14: error: implicit
declaration of function ‘getpagesize’
   Product: gcc
   Version: 10.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libbacktrace
  Assignee: unassigned at gcc dot gnu.org
  Reporter: xantares09 at hotmail dot com
CC: ian at gcc dot gnu.org
  Target Milestone: ---

when updating archlinux mingw-w64-gcc from 9.3.0 to 10.1.0
I noticed that libbacktrace fails to build because of an extra "-Werror"
present during the compilation of libbacktrace that was not here for previous
versions:

libtool: compile: 
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/build-i686-w64-mingw32/./gcc/xgcc
-B/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/build-i686-w64-mingw32/./gcc/
-L/usr/i686-w64-mingw32/lib -L/usr/mingw/lib -isystem
/usr/i686-w64-mingw32/include -isystem /usr/mingw/include
-B/usr/i686-w64-mingw32/bin/ -B/usr/i686-w64-mingw32/lib/ -isystem
/usr/i686-w64-mingw32/include -isystem /usr/i686-w64-mingw32/sys-include
-DHAVE_CONFIG_H -I.
-I/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/libbacktrace -I
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/libbacktrace/../include
-I
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/libbacktrace/../libgcc
-I ../libgcc -funwind-tables -frandom-seed=mmapio.lo -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-attribute -Wcast-qual -Werror -g -O2 -c
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/libbacktrace/mmapio.c
 -DDLL_EXPORT -DPIC -o .libs/mmapio.o
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/libbacktrace/mmapio.c:
In function ‘backtrace_get_view’:
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/libbacktrace/mmapio.c:69:14:
error: implicit declaration of function ‘getpagesize’
[-Werror=implicit-function-declaration]

[Bug tree-optimization/88156] ftree-vrp elides sign condition on mingw

2018-11-23 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88156

xantares09 at hotmail dot com changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

--- Comment #8 from xantares09 at hotmail dot com ---
Ok, thank you.

[Bug tree-optimization/88156] ftree-vrp elides sign condition on mingw

2018-11-23 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88156

xantares09 at hotmail dot com changed:

   What|Removed |Added

 Resolution|INVALID |FIXED

--- Comment #7 from xantares09 at hotmail dot com ---
Ok, thank you.

[Bug tree-optimization/88156] ftree-vrp elides sign condition on mingw

2018-11-23 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88156

--- Comment #4 from xantares09 at hotmail dot com ---
I found this in stddef.h:

#ifndef __WCHAR_TYPE__
/* wchar_t is unsigned short for compatibility with MS runtime */
#define __WCHAR_TYPE__ unsigned short
#endif

[Bug tree-optimization/88156] ftree-vrp elides sign condition on mingw

2018-11-23 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88156

--- Comment #3 from xantares09 at hotmail dot com ---
Add yes, your C testcase leads to the same results.

[Bug tree-optimization/88156] ftree-vrp elides sign condition on mingw

2018-11-23 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88156

--- Comment #2 from xantares09 at hotmail dot com ---
Thanks for the quick reply.

On mingw __WCHAR_TYPE__ expands to short unsigned int:

$ x86_64-w64-mingw32-gcc -E main.c
...
# 3 "main.cxx"
int string_hash(const short unsigned int* data) {


On x86_64-linux it expands to int:
$ gcc -E main.c
...
# 3 "main.c"
int string_hash(const int* data) {

[Bug tree-optimization/88156] New: ftree-vrp elides sign condition on mingw

2018-11-22 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88156

Bug ID: 88156
   Summary: ftree-vrp elides sign condition on mingw
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: xantares09 at hotmail dot com
  Target Milestone: ---

Using mingw/gcc 8.2.0, at O2 level, ftree-vrp seems to elide the if(h<0)
condition in the following example:

#include 

int string_hash(const wchar_t* data) {
  int h = 0;

  if (!data){
return 0;
  }

  while (*data != 0) {
h = (h * 7) ^ *data;
++data;
  }

  if (h < 0) {
h = -h;
  }

  return h;
}

int main(int argc, char *argv[])
{
  int hash = string_hash(L"PROBABILIT");
  std::cout << "hash= "<

[Bug rtl-optimization/85638] [8/9 regression] build failure for Ada runtime with SJLJ exceptions on x86

2018-05-08 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85638

--- Comment #15 from xantares09 at hotmail dot com ---
The build goes through with your second patch too, thanks a lot.

[Bug ada/85638] [8/9 regression] build failure for Ada runtime with SJLJ exceptions on x86

2018-05-04 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85638

--- Comment #11 from xantares09 at hotmail dot com ---
Oh, ok

[Bug ada/85638] [8/9 regression] build failure for Ada runtime with SJLJ exceptions on x86

2018-05-04 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85638

--- Comment #9 from xantares09 at hotmail dot com ---
Yes, I applied your patch, now the build fails with another error:

gcc -c -I./ -I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib/../adainclude
-I/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib -I.
-I/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc/gcc/ada -g -O2 -W
-Wall -gnatpg -gnata -I-
/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc-8.1.0/gcc/ada/fmap.adb
fmap.adb:304:18: "Null_FD" is undefined
gnatmake:
"/home/xantares/projects/aur-scripts/mingw-w64-gcc/src/gcc-8.1.0/gcc/ada/fmap.adb"
compilation error

[Bug ada/85638] gcc 8.1.0 fails to build ada language for target i686-w64-mingw32

2018-05-03 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85638

--- Comment #2 from xantares09 at hotmail dot com ---
Created attachment 44061
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44061=edit
./src/gcc-build-i686-w64-mingw32/gcc/ada/rts/a-calend.adb

[Bug ada/85638] gcc 8.1.0 fails to build ada language for target i686-w64-mingw32

2018-05-03 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85638

--- Comment #1 from xantares09 at hotmail dot com ---
Created attachment 44060
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44060=edit
??

[Bug ada/85638] New: gcc 8.1.0 fails to build ada language for target i686-w64-mingw32

2018-05-03 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85638

Bug ID: 85638
   Summary: gcc 8.1.0 fails to build ada language for target
i686-w64-mingw32
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: xantares09 at hotmail dot com
  Target Milestone: ---

Created attachment 44059
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44059=edit
error log

Summary
===
Archlinux, x86_64, trying to compile mingw-w64-gcc 8.1.0:

+===GNAT BUG DETECTED==+
| 8.1.0 (i686-w64-mingw32) GCC error:  |
| in find_rarely_executed_basic_blocks_and_crossing_edges, at  |
| bb-reorder.c:1673|
| Error detected around a-calend.adb:801:11|

See error.log for more details
Build goes through if I disable ada.
Binutils is 2.30, mingw crt/winpthreads 5.0.3, installed mingw-w64-gcc is 7.3.0

Compilation options
===
configure --prefix=/usr --libexecdir=/usr/lib \
--target=i686-w64-mingw32 \
--enable-languages=c,lto,c++,objc,obj-c++,fortran,ada \
--enable-shared --enable-static \
--enable-threads=posix --enable-fully-dynamic-string
--enable-libstdcxx-time=yes \
--with-system-zlib --enable-cloog-backend=isl \
--enable-lto --disable-dw2-exceptions --enable-libgomp \
--disable-multilib --enable-checking=release

[Bug libgomp/67141] wrong libgomp mutex initialisation order

2015-10-28 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67141

--- Comment #9 from xantares09 at hotmail dot com ---
I can confirm the patch from gcc-5 branch applied on top of 5.2.0 fixes the
mingw problem.
Thanks a lot.
xan.


[Bug libgomp/67141] wrong libgomp mutex initialisation order

2015-08-12 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67141

--- Comment #2 from xantares09 at hotmail dot com ---
Note that you'll need mingw-w64 4.0.4, not 4.0.2 to reproduce, I used gcc
5.2.0.


[Bug libgomp/67141] wrong libgomp mutex initialisation order

2015-08-11 Thread xantares09 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67141

xantares09 at hotmail dot com changed:

   What|Removed |Added

 CC||xantares09 at hotmail dot com

--- Comment #1 from xantares09 at hotmail dot com ---
Created attachment 36169
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36169action=edit
call initialize_env before goacc_host_init

I can reproduce here:
err:module:attach_process_dlls libgomp-1.dll failed to initialize, aborting

Mattias is totally right:
if i assign a higher initialization priority to env.c:initialize_env than
oacc-host.c:goacc_host_init the dll is correctly initialized

the patch may not be ok, but you get the idea