[Bug target/83585] [8 Regression] Assembler messages: Error: can't resolve `.text' {.text section} - `.LCOLDB0' {.text.unlikely section}

2017-12-25 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83585

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-25
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf  ---
The testcase is invalid. Perhaps we should simply reject return
statements without a value in non void functions (like clang).

[Bug target/83585] [8 Regression] Assembler messages: Error: can't resolve `.text' {.text section} - `.LCOLDB0' {.text.unlikely section}

2017-12-25 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83585

--- Comment #2 from Andrew Pinski  ---
(In reply to Markus Trippelsdorf from comment #1)
> The testcase is invalid. 

No I think the testcase is just undefined at runtime if that return is
executed.

[Bug c/83584] "ISO C forbids conversion of object pointer to function pointer type" -- no, not really

2017-12-25 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83584

--- Comment #5 from Andreas Schwab  ---
Note that POSIX requires such casts to work (for dlsym).

[Bug c/83586] New: [8 regression] Invalid -Wformat-truncation on stdio2.h

2017-12-25 Thread sylvestre at debian dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83586

Bug ID: 83586
   Summary: [8 regression] Invalid -Wformat-truncation on stdio2.h
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sylvestre at debian dot org
CC: trippels at gcc dot gnu.org
  Target Milestone: ---

/root/firefox-gcc-last/dom/gamepad/linux/LinuxGamepad.cpp: In member function
'void {anonymous}::LinuxGamepadService::AddDevice(mozilla::udev_device*)':
/root/firefox-gcc-last/dom/gamepad/linux/LinuxGamepad.cpp:87:1: error: '%s'
directive output may be truncated writing up to 127 bytes into a region of size
between 112 and 126 [-Werror=format-truncation=]
 LinuxGamepadService::AddDevice(struct udev_device* dev)
 ^~~
In file included from /usr/include/stdio.h:938,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/stdio.h:3,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/nsTraceRefcnt.h:9,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Assertions.h:23,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/Casting.h:12,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/js/Value.h:13,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/include/mozilla/ErrorResult.h:31,
 from /root/firefox-gcc-last/dom/gamepad/Gamepad.h:10,
 from /root/firefox-gcc-last/dom/gamepad/Gamepad.cpp:7,
 from
/root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dom/gamepad/Unified_cpp_dom_gamepad0.cpp:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:35: note:
'__builtin___snprintf_chk' output 3 or more bytes (assuming 144) into a
destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  ~^~~
__bos (__s), __fmt, __va_arg_pack ());
~
cc1plus: all warnings being treated as errors


Not sure what is going on but we don't have this issue with gcc 7

[Bug target/83488] [8 Regression] ICE on a CET test-case

2017-12-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83488

--- Comment #26 from Jakub Jelinek  ---
Author: jakub
Date: Mon Dec 25 11:59:17 2017
New Revision: 255997

URL: https://gcc.gnu.org/viewcvs?rev=255997&root=gcc&view=rev
Log:
PR target/83488
* config/i386/i386.opt (-mavx512vpopcntdq, -mmavx512bitalg): Move from
ix86_isa_flags2 to ix86_isa_flags.
* config/i386/i386-c.c (ix86_target_macros_internal): Test
OPTION_MASK_ISA_AVX512BITALG and OPTION_MASK_ISA_AVX512VPOPCNTDQ in
isa_flags rather than isa_flags2.
* config/i386/i386.c (ix86_target_string): Move -mavx512vpopcntdq
and -mavx512bitalg from isa2_opts to isa_opts.
(ix86_option_override_internal): Test OPTION_MASK_ISA_AVX512VPOPCNTDQ
in x_ix86_isa_flags_explicit rather than x_ix86_isa_flags2_explicit
and set it in x_ix86_isa_flags rather than x_ix86_isa_flags2.
Formatting fixes.
(def_builtin): Treat OPTION_MASK_ISA_AVX512BW or
OPTION_MASK_ISA_AVX512F ored with another option similarly to
OPTION_MASK_ISA_AVX512VL.  Even for OPTION_MASK_ISA_AVX512VL don't
clear it if mask is just OPTION_MASK_ISA_AVX512VL itself.
(ix86_expand_builtin): Don't handle OPTION_MASK_ISA_GFNI and
OPTION_MASK_ISA_VPCLMULQDQ specially, instead handle
OPTION_MASK_ISA_AVX512BW and OPTION_MASK_ISA_AVX512F that way.
* config/i386/i386-builtin.def: Move AVX512VPOPCNTDQ and AVX512BITALG
builtins from bdesc_args2 to bdesc_args section.
(__builtin_ia32_compressstoreuqi512_mask,
__builtin_ia32_compressstoreuhi512_mask,
__builtin_ia32_compressstoreuqi256_mask,
__builtin_ia32_expandloadqi512_mask,
__builtin_ia32_expandloadqi512_maskz,
__builtin_ia32_expandloadhi512_mask,
__builtin_ia32_expandloadhi512_maskz,
__builtin_ia32_compressqi512_mask, __builtin_ia32_compresshi512_mask,
__builtin_ia32_compressqi256_mask, __builtin_ia32_expandqi512_mask,
__builtin_ia32_expandqi512_maskz, __builtin_ia32_expandhi512_mask,
__builtin_ia32_expandhi512_maskz, __builtin_ia32_expandqi256_mask,
__builtin_ia32_expandqi256_maskz, __builtin_ia32_vpshrd_v32hi_mask,
__builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshrdv_v32hi_mask,
__builtin_ia32_vpshrdv_v32hi_maskz, __builtin_ia32_vpshldv_v32hi_mask,
__builtin_ia32_vpshldv_v32hi_maskz,
__builtin_ia32_vpopcountb_v64qi_mask,
__builtin_ia32_vpopcountw_v32hi_mask,
__builtin_ia32_vpshufbitqmb512_mask,
__builtin_ia32_vpshufbitqmb256_mask): Add
" | OPTION_MASK_ISA_AVX512BW".
(__builtin_ia32_expandloadqi256_mask,
__builtin_ia32_expandloadqi256_maskz,
__builtin_ia32_vpopcountb_v32qi_mask): Add
" | OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA_AVX512BW".
(__builtin_ia32_expandloadhi256_mask,
__builtin_ia32_expandloadhi256_maskz,
__builtin_ia32_expandloadqi128_mask,
__builtin_ia32_expandloadqi128_maskz,
__builtin_ia32_expandloadhi128_mask,
__builtin_ia32_expandloadhi128_maskz,
__builtin_ia32_vpshrd_v16hi, __builtin_ia32_vpshrd_v16hi_mask,
__builtin_ia32_vpshrd_v8hi, __builtin_ia32_vpshrd_v8hi_mask,
__builtin_ia32_vpshrd_v8si, __builtin_ia32_vpshrd_v8si_mask,
__builtin_ia32_vpshrd_v4si, __builtin_ia32_vpshrd_v4si_mask,
__builtin_ia32_vpshrd_v4di, __builtin_ia32_vpshrd_v4di_mask,
__builtin_ia32_vpshrd_v2di, __builtin_ia32_vpshrd_v2di_mask,
__builtin_ia32_vpshld_v16hi, __builtin_ia32_vpshld_v16hi_mask,
__builtin_ia32_vpshld_v8hi, __builtin_ia32_vpshld_v8hi_mask,
__builtin_ia32_vpshld_v8si, __builtin_ia32_vpshld_v8si_mask,
__builtin_ia32_vpshld_v4si, __builtin_ia32_vpshld_v4si_mask,
__builtin_ia32_vpshld_v4di, __builtin_ia32_vpshld_v4di_mask,
__builtin_ia32_vpshld_v2di, __builtin_ia32_vpshld_v2di_mask,
__builtin_ia32_vpshrdv_v16hi, __builtin_ia32_vpshrdv_v16hi_mask,
__builtin_ia32_vpshrdv_v16hi_maskz, __builtin_ia32_vpshrdv_v8hi,
__builtin_ia32_vpshrdv_v8hi_mask, __builtin_ia32_vpshrdv_v8hi_maskz,
__builtin_ia32_vpshrdv_v8si, __builtin_ia32_vpshrdv_v8si_mask,
__builtin_ia32_vpshrdv_v8si_maskz, __builtin_ia32_vpshrdv_v4si,
__builtin_ia32_vpshrdv_v4si_mask, __builtin_ia32_vpshrdv_v4si_maskz,
__builtin_ia32_vpshrdv_v4di, __builtin_ia32_vpshrdv_v4di_mask,
__builtin_ia32_vpshrdv_v4di_maskz, __builtin_ia32_vpshrdv_v2di,
__builtin_ia32_vpshrdv_v2di_mask, __builtin_ia32_vpshrdv_v2di_maskz,
__builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
__builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
__builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
__builtin_ia32_vpshldv_v8si, __builtin_ia32_vpshldv_v8si_mask,
__builtin_ia32_vpshldv_v8si_maskz, __builti

[Bug tree-optimization/83573] [8 Regression] invalid access introduced in predcom

2017-12-25 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83573

Alexander Monakov  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-25
 CC||amker at gcc dot gnu.org,
   ||amonakov at gcc dot gnu.org
Summary|Wrong constant folding  |[8 Regression] invalid
   ||access introduced in
   ||predcom
 Ever confirmed|0   |1

--- Comment #2 from Alexander Monakov  ---
I think the actual culprit is predcom rather than ch_vect; predcom introduces:

   [local count: 136902083]:
  _26 = (unsigned char) t_29;
  _25 = -_26;
  _34 = (signed char) _25;
  _33 = (sizetype) _34;
  _53 = _33 * 4;
  _54 = &a + _53;
  a_I_lsm0.9_55 = MEM[(int *)_54 + 520B];

where t_29 corresponds to value 129 at runtime; assignment to _34 assigns 127
and then the assignment to a_I_lsm0.9_55 performs an OOB access.

[Bug gcov-profile/83587] New: A goto statement inside if statement leads the label incorrectly marked as not executed in gcov

2017-12-25 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83587

Bug ID: 83587
   Summary: A goto statement inside if statement leads the label
incorrectly marked as not executed in gcov
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: yangyibiao at nju dot edu.cn
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.2.0-8ubuntu3'
--with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3)

$ cat small.c
int main()
{
int i = 1;
if (i > 0)
goto lbl1;

if (1) {
lbl1:
i++;
}

if (1)
goto lbl2;

if (1) {
lbl2:
i++;
}
}

$ gcc -fprofile-arcs -ftest-coverage small.c; ./a.out; gcov small.c; cat
small.c.gcov
File 'small.c'
Lines executed:88.89% of 9
Creating 'small.c.gcov'

-:0:Source:small.c
-:0:Graph:small.gcno
-:0:Data:small.gcda
-:0:Runs:1
-:0:Programs:1
1:1:int main()
-:2:{
1:3:int i = 1;
1:4:if (i > 0)
1:5:goto lbl1;
-:6:
-:7:if (1) {
#:8:lbl1:
1:9:i++;
-:   10:}
-:   11:
-:   12:if (1)
1:   13:goto lbl2;
-:   14:
-:   15:if (1) {
1:   16:lbl2:
1:   17:i++;
-:   18:}
-:   19:}

Line #8 is wrongly marked as not executed. However, Line #16 is correctly
marked as executed.

[Bug gcov-profile/83266] [GCOV] A True if statement is wrongly marked as not executed in gcov

2017-12-25 Thread yangyibiao at nju dot edu.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83266

--- Comment #5 from Yibiao Yang  ---
(In reply to Martin Liška from comment #3)
> (In reply to Yibiao Yang from comment #1)
> > I am not very sure whether this is a bug or it is only the default behavior
> > in gcov. 
> > 
> 
> Yes, it's expected. Note that even without any optimization level we do some
> folding. And that's reason why 1 > 0 is optimized out.
> Thanks for the bug report.

Is it possible to mark such kind of if (1) statement as executed and if (0) as
not executed in gcov? Or is it cost too much to achieve that?

[Bug libgomp/82391] [openacc] acc_on_device not folded at -O0

2017-12-25 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82391

Tom de Vries  changed:

   What|Removed |Added

  Attachment #42274|0   |1
is obsolete||

--- Comment #2 from Tom de Vries  ---
Created attachment 42964
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42964&action=edit
Updated patch, works for c++ as well

[Bug fortran/83548] [6/7/8 Regression] Compilation Error using logical function in parameter

2017-12-25 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83548

--- Comment #4 from kargl at gcc dot gnu.org ---
Patch submitted.

https://gcc.gnu.org/ml/fortran/2017-12/msg00093.html

[Bug c/83584] "ISO C forbids conversion of object pointer to function pointer type" -- no, not really

2017-12-25 Thread Keith.S.Thompson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83584

--- Comment #6 from Keith Thompson  ---
Andreas: As I understand it, POSIX requires conversions between
object pointers and function pointers to work only for the specific
values returned by dlsym().

In any case, that's not directly relevant to this bug.

[Bug fortran/83548] [6/7/8 Regression] Compilation Error using logical function in parameter

2017-12-25 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83548

--- Comment #5 from Steve Kargl  ---
On Mon, Dec 25, 2017 at 07:46:47PM +, kargl at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83548
> 
> --- Comment #4 from kargl at gcc dot gnu.org ---
> Patch submitted.
> 
> https://gcc.gnu.org/ml/fortran/2017-12/msg00093.html
> 

The patch applies to 7-branch and regression tests cleanly.
The patch does not apply to 6-branch.  This would entail
backporting the change for both REAL and the fix here.

[Bug c++/83588] New: Structs with two flexible arrays causes an internal compiler error

2017-12-25 Thread patricioravi at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83588

Bug ID: 83588
   Summary: Structs with two flexible arrays causes an internal
compiler error
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patricioravi at gmail dot com
  Target Milestone: ---

Instead of reporting that it is not possible to create such a struct, the GCC
fails.

CODE:

struct Foo  
{   
int val;
int arr1[]; 
int arr2[]; 
}; 
  
Foo t = {1, {0, 0, 0}, {0, 0, 0}}; 

ERROR:

bugreport.cpp:7:34: internal compiler error: in
output_constructor_regular_field, at varasm.c:4997

[Bug libgomp/83589] New: [nvptx] mode-transitions.c and private-variables.{c,f90} execution FAILs

2017-12-25 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83589

Bug ID: 83589
   Summary: [nvptx] mode-transitions.c and
private-variables.{c,f90} execution FAILs
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

At r254929, with cuda 7.5, nvidia driver 384.90 on a Quadro M1200 and
GOMP_NVPTX_JIT=-O0 I observe these nvptx offloading failures:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O0  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/mode-transitions.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/private-variables.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O0  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/private-variables.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/mode-transitions.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O0  execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/mode-transitions.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/private-variables.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O0  execution test
FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/private-variables.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-fortran/private-variables.f90 -DACC_DEVICE_TYPE_nvidia=1
-DACC_MEM_SHARED=0  -O0  execution test
FAIL: libgomp.oacc-fortran/private-variables.f90 -DACC_DEVICE_TYPE_nvidia=1
-DACC_MEM_SHARED=0  -O1  execution test
FAIL: libgomp.oacc-fortran/private-variables.f90 -DACC_DEVICE_TYPE_nvidia=1
-DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-fortran/private-variables.f90 -DACC_DEVICE_TYPE_nvidia=1
-DACC_MEM_SHARED=0  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops
-ftracer -finline-functions  execution test
FAIL: libgomp.oacc-fortran/private-variables.f90 -DACC_DEVICE_TYPE_nvidia=1
-DACC_MEM_SHARED=0  -O3 -g  execution test
FAIL: libgomp.oacc-fortran/private-variables.f90 -DACC_DEVICE_TYPE_nvidia=1
-DACC_MEM_SHARED=0  -Os  execution test
...

[Bug libgomp/83590] New: [nvptx] openacc reduction C regressions

2017-12-25 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83590

Bug ID: 83590
   Summary: [nvptx] openacc reduction C regressions
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

At r254930, with cuda 7.5, nvidia driver 384.90 on a Quadro M1200 and
GOMP_NVPTX_JIT=-O0 I observe these new nvptx offloading failures, compared to
r254929:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/combined-directives-1.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/pr70688.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-1.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-2.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-3.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-4.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0  -O2  execution test
...

[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast

2017-12-25 Thread gcc at ryandesign dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009

Ryan Schmidt  changed:

   What|Removed |Added

 CC||gcc at ryandesign dot com

--- Comment #9 from Ryan Schmidt  ---
I am also encountering this problem on i386-apple-darwin9.8.0 when compiling
texlive-bin 20170604 with gcc 6.4.0, though in my case it's -Os not -Ofast:

libtool: compile:  /opt/local/bin/gcc-mp-6 -DHAVE_CONFIG_H -I.
-I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6
-U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686
-msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os -m32 -MT
LuaJIT-src/src/lj_cconv.lo -MD -MP -MF LuaJIT-src/src/.deps/lj_cconv.Tpo -c
LuaJIT-src/src/lj_cconv.c  -fno-common -DPIC -o LuaJIT-src/src/.libs/lj_cconv.o
LuaJIT-src/src/lj_cconv.c: In function 'lj_cconv_ct_ct':
LuaJIT-src/src/lj_cconv.c:368:1: internal compiler error: in gen_reg_rtx, at
emit-rtl.c:1025
 }
 ^
libbacktrace could not find executable to open

[Bug c++/83591] New: -Wduplicated-branches fires in system headers in template instantiation

2017-12-25 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83591

Bug ID: 83591
   Summary: -Wduplicated-branches fires in system headers in
template instantiation
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: TonyELewis at hotmail dot com
  Target Milestone: ---

Compiling with:


g++ -Werror -Wduplicated-branches -c -isystem sysheaddir b.cpp


where b.cpp is :


#include "a.hpp"


...and sysheaddir/a.hpp is:


template 
void f() {
int b;
( b ? b : b );
}

void g() {
f<>();
}


...gives:


sysheaddir/a.hpp:8:6:   required from here
cc1plus: error: this condition has identical branches
[-Werror=duplicated-branches]
cc1plus: all warnings being treated as errors


Thought the code *does* have duplicate branches, I see two problems with this:
 * the warning is firing even though all the code relevant to the warning is in
a system header
 * the warning doesn't provide the line number on which the identical branches
appear

I suspect that it's already the intended design that this warning shouldn't
fire in system headers. Indeed, if I add a simple `void h() { int b; b ? b : b;
}` into b.cpp, it triggers the warning but if I add it to the system header
sysheaddir/a.hpp, it doesn't.


I'm using g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0. It looks to me from using
godbolt.org, that the same problems persist in trunk (8.0.0 20171225).


I suspect this is related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82541
but it has differences:
 * I'm highlighting a true positive warning in a *system* header (rather than a
false positive in the .cpp file)
 * I'm highlighting the lack of line number in the warning message

[Bug c++/83591] -Wduplicated-branches fires in system headers in template instantiation

2017-12-25 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83591

--- Comment #1 from Tony E Lewis  ---
Created attachment 42965
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42965&action=edit
Intermediate file

[Bug c++/83591] -Wduplicated-branches fires in system headers in template instantiation

2017-12-25 Thread TonyELewis at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83591

--- Comment #2 from Tony E Lewis  ---
Further, even adding:


#pragma GCC diagnostic ignored "-Wduplicated-branches"


...doesn't appear to stop these warnings in this example code, though it does
correctly silence the warning in non-template functions.