[Bug rtl-optimization/87708] [9 Regression] ira-shrinkwrap-prep-[12].c testcases fail after r265398

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87708

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
Version|unknown |9.0
   Target Milestone|--- |9.0
Summary|ira-shrinkwrap-prep-[12].c  |[9 Regression]
   |testcases fail after|ira-shrinkwrap-prep-[12].c
   |r265398 |testcases fail after
   ||r265398
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.

[Bug regression/87720] New: [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

Bug ID: 87720
   Summary: [MIPS] ICE:
gcc.c-torture/execute/builtins/lib/chk.c:33:1: in
int_mode_for_mode, at stor-layout.c:403 after r265398
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
  Assignee: unassigned at gcc dot gnu.org
  Reporter: paul.hua.gm at gmail dot com
  Target Milestone: ---

Created attachment 44885
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44885&action=edit
preprocessed .i file

/home/xuchenghua/GCC/test/gcc-r265420_obj/gcc/cc1 -fpreprocessed
memcpy-chk-lib.i -mel -quiet -dumpbase memcpy-chk-lib.c -march=mips64r2
-mabi=64 -mllsc -mips64r2 -mno-shared -auxbase memcpy-chk-lib -O1 -w -version
-fdiagnostics-color=never -fno-diagnostics-show-caret
-fno-diagnostics-show-line-numbers -fno-tree-loop-distribute-patterns
-fno-tracer -o memcpy-chk-lib.s 
GNU C17 (gcc trunk r265420 with mips64r2 n64) version 9.0.0 20181023
(experimental) (mips64el-linux-gnu)
   
 compiled by GNU C
version 9.0.0 20181023 (experimental), GMP version 6.1.2, MPFR version 3.1.5,
MPC version 1.0.3, isl version none 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
   
   
  GNU C17 (gcc trunk r265420 with
mips64r2 n64) version 9.0.0 20181023 (experimental) (mips64el-linux-gnu)   
   
   
  compiled by GNU C version 9.0.0 20181023 (experimental), GMP
version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version none  
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
Compiler executable checksum: 7ce7412cdce432471eecf7d33f867911  
during RTL pass: combine
In file included from
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk-lib.c:1:
 
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c:
In function ‘__chk_fail’:   
/home/xuchenghua/GCC/gcc_git_trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c:33:1:
internal compiler error: in int_mode_for_mode, at stor-layout.c:403 
0x12089698f int_mode_for_mode(machine_mode) 
../../../gcc_git_trunk/gcc/stor-layout.c:403
0x120462cff emit_move_via_integer   
../../../gcc_git_trunk/gcc/expr.c:3361  
0x120473a43 emit_move_insn_1(rtx_def*, rtx_def*)
../../../gcc_git_trunk/gcc/expr.c:3722  
0x12047b50f gen_move_insn(rtx_def*, rtx_def*)   
../../../gcc_git_trunk/gcc/expr.c:3810  
0x12104b303 make_more_copies
../../../gcc_git_trunk/gcc/combine.c:14969  
0x12104b303 rest_of_handle_combine 
   
   
 
../../../gcc_git_trunk/gcc/combine.c:14984  
0x12104b303 execute
   
   
 
../../../gcc_git_trunk/gcc/combine.c:15039  
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.  
See  for instructions.

[Bug lto/87698] [lto] Shared library build with -ffat-lto-objects generates extra global absolute symbol relocations

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87698

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 CC||hjl at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #7 from Richard Biener  ---
Confirmed.

The linker resolution fed to the WPA stage is the same.

The issue goes away when not using -g or when using gold as the linker.

HJ, this looks like a BFD linker issue to me - not sure where that
.dynsym for 'f' comes from.  It looks like being a left-over from the
fat object part but it's weird that it only happens with -g (maybe
the fat debug somehow keeps it live).  There is a .rela.text relocation
in test2.o (fat) to f.  But a ABS dynsym is weird in any case.

[Bug c++/87714] [8/9 Regression] ICE on valid C++ code: in type_dependent_expression_p, at cp/pt.c:25178

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87714

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug rtl-optimization/87718] [9 Regression] FAIL: gcc.target/i386/avx512dq-concatv2si-1.c

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87718

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization, ra
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

[Bug rtl-optimization/87717] [9 Regression] FAIL: gcc.target/i386/avx512vl-concatv2si-1.c scan-assembler vpunpckldq[^\n\r]*%xmm17[^\n\r]*%xmm16[^\n\r]*%xmm3

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87717

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization, ra
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

[Bug regression/87720] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

Paul Hua  changed:

   What|Removed |Added

 Target||mips

--- Comment #1 from Paul Hua  ---
This can be reproduced by cross-compiler.

configure with:
../configure --target=mips64el-linux-gnu --enable-languages=c,c++

and simple test case:

$ cat longjmp.i
# 1 "longjmp.c"
# 1 ""
# 1 ""
# 31 ""
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "" 2
# 1 "longjmp.c"
# 16 "longjmp.c"
typedef void *jmp_buf;
jmp_buf buf;



void do_jump(void) {
  __builtin_longjmp(buf, 1);
}



void f(void);

void do_setjmp(void) {
  if (!__builtin_setjmp(buf))
f();
}


gcc/cc1 -fpreprocessed longjmp.i -mel -quiet -dumpbase longjmp.c
-march=mips64r2 -mllsc -mno-madd4 -mips64r2 -mabi=64 -auxbase-strip longjmp.o
-O2 -version -o longjmp.s

during RTL pass: combine
longjmp.c: In function ‘do_jump’:
longjmp.c:27:1: internal compiler error: in int_mode_for_mode, at
stor-layout.c:403
   27 | }
  | ^
0x12089698f int_mode_for_mode(machine_mode)
../../../gcc_git_trunk/gcc/stor-layout.c:403
0x120462cff emit_move_via_integer
../../../gcc_git_trunk/gcc/expr.c:3361
0x120473a43 emit_move_insn_1(rtx_def*, rtx_def*)
../../../gcc_git_trunk/gcc/expr.c:3722
0x12047b50f gen_move_insn(rtx_def*, rtx_def*)
../../../gcc_git_trunk/gcc/expr.c:3810
0x12104b303 make_more_copies
../../../gcc_git_trunk/gcc/combine.c:14969
0x12104b303 rest_of_handle_combine
../../../gcc_git_trunk/gcc/combine.c:14984
0x12104b303 execute
../../../gcc_git_trunk/gcc/combine.c:15039
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/87463] [9 Regression] ICE in in tsubst_copy, at cp/pt.c:15513

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87463

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Liška  ---
I guess it's dup.

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

[Bug c++/87269] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15475 starting from r261802

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87269

Martin Liška  changed:

   What|Removed |Added

 CC||larsbj at gullik dot net

--- Comment #3 from Martin Liška  ---
*** Bug 87463 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/84013] wrong __restrict clique with inline asm operand

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84013

--- Comment #6 from Richard Biener  ---
Created attachment 44886
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44886&action=edit
patch I am testing

Patch I am testing - sorry for the delay.

[Bug c++/87721] New: [9 Regression] ICE in linemap_position_for_line_and_column at gcc/libcpp/line-map.c:842 since r265271

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87721

Bug ID: 87721
   Summary: [9 Regression] ICE in
linemap_position_for_line_and_column at
gcc/libcpp/line-map.c:842 since r265271
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Hi.

This is follow up of PR87562 which was introduced by commit that fixed the
issue.
Unfortunately I can't reproduce that with -E -C so that one needs to do
following:

$ wget https://github.com/aqbanking/gwenhywfar/archive/4.20.1.tar.gz
$ tar xvzf 4.20.1.tar.gz
$ cd gwenhywfar-4.20.1
$ autoreconf -ifv && ./configure --with-guis && make -j8
...
make[4]: Entering directory
'/home/marxin/BIG/osc/home:marxin:gcc9-incubator-v1/gwenhywfar/gwenhywfar-4.20.1/src/base'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H
-DGWEN_BUFFER_DEFAULT_HARDLIMIT='(16*1024*1024)' -I. -I../..
-I../../gwenhywfar4 -I../../src/ -I../../src/base -I../../src/gui
-I../../src/io -I../../src/ipc -I../../src/parser   -fvisibility=hidden 
-DBUILDING_GWENHYWFAR -g -O2 -Wall -Wall -MT plugin.lo -MD -MP -MF
.deps/plugin.Tpo -c -o plugin.lo plugin.c
libtool: compile:  gcc -DHAVE_CONFIG_H
"-DGWEN_BUFFER_DEFAULT_HARDLIMIT=(16*1024*1024)" -I. -I../..
-I../../gwenhywfar4 -I../../src/ -I../../src/base -I../../src/gui
-I../../src/io -I../../src/ipc -I../../src/parser -fvisibility=hidden
-DBUILDING_GWENHYWFAR -g -O2 -Wall -Wall -MT plugin.lo -MD -MP -MF
.deps/plugin.Tpo -c plugin.c  -fPIC -DPIC -o .libs/plugin.o
during GIMPLE pass: printf-return-value
plugin.c: In function ‘GWEN_PluginManager_LoadPlugin’:
plugin.c:340:14: internal compiler error: Segmentation fault
  340 | GWEN_PLUGIN *GWEN_PluginManager_LoadPlugin(GWEN_PLUGIN_MANAGER *pm,
  |  ^
0x11884b4 crash_signal
/home/marxin/Programming/gcc/gcc/toplev.c:325
0x76bc310f ???
   
/usr/src/debug/glibc-2.27-6.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x1fa1640 linemap_position_for_line_and_column(line_maps*, line_map_ordinary
const*, unsigned int, unsigned int)
/home/marxin/Programming/gcc/libcpp/line-map.c:842
0x1f7c786 get_substring_ranges_for_loc
/home/marxin/Programming/gcc/gcc/input.c:1472
0x1f7c903 get_source_location_for_substring(cpp_reader*, string_concat_db*,
unsigned int, cpp_ttype, int, int, int, unsigned int*)
/home/marxin/Programming/gcc/gcc/input.c:1525
0x972881 c_get_substring_location(substring_loc const&, unsigned int*)
/home/marxin/Programming/gcc/gcc/c-family/c-common.c:865
0x117dbdf substring_loc::get_location(unsigned int*) const
/home/marxin/Programming/gcc/gcc/substring-locations.c:284
0x117d70b format_string_diagnostic_t::emit_warning_n_va(int, unsigned long,
char const*, char const*, __va_list_tag (*) [1]) const
/home/marxin/Programming/gcc/gcc/substring-locations.c:156
0x117da15 format_string_diagnostic_t::emit_warning_va(int, char const*,
__va_list_tag (*) [1]) const
/home/marxin/Programming/gcc/gcc/substring-locations.c:241
0x1d98d83 fmtwarn
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:472
0x1d9ddfc maybe_warn
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:2529
0x1d9eab3 format_directive
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:2817
0x1da0735 compute_format_length
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:3497
0x1da188a handle_gimple_call
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:3981
0x1da1a21 before_dom_children
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:4020
0x1d262e1 dom_walker::walk(basic_block_def*)
/home/marxin/Programming/gcc/gcc/domwalk.c:353
0x1da1ac3 execute
/home/marxin/Programming/gcc/gcc/gimple-ssa-sprintf.c:4046

Feel free to contact me with how to reproduce that.

[Bug ada/87715] problems with asan and -O3 build of ada

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87715

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Interesting, let me try to reproduce that. Note that using -O3 can't be problem
as it's supposed to do only valid code transformations.

[Bug c++/87721] [9 Regression] ICE in linemap_position_for_line_and_column at gcc/libcpp/line-map.c:842 since r265271

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87721

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
   Target Milestone|--- |9.0
 Ever confirmed|0   |1
  Known to fail||9.0

[Bug tree-optimization/87105] Autovectorization [X86, SSE2, AVX2, DoublePrecision]

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87105

--- Comment #12 from Richard Biener  ---
With the duplicate store issue fixed in the vectorizer we run into the SLP
vectorization issue that limits the growth of the SLP tree (yes, it's a tree
and thus tends to grow expontential easily...).

[Bug bootstrap/87722] go bootstrap is broken on armv7l target

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87722

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2018-10-24
   Target Milestone|--- |9.0

[Bug bootstrap/87722] New: go bootstrap is broken on armv7l target

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87722

Bug ID: 87722
   Summary: go bootstrap is broken on armv7l target
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: ian at gcc dot gnu.org
  Target Milestone: ---

I see following:

[ 6365s] checking for catanf... libtool: compile: 
/home/abuild/rpmbuild/BUILD/gcc-9.0.0+r265378/obj-armv7hl-suse-linux-gnueabi/./gcc/gccgo
-B/home/abuild/rpmbuild/BUILD/gcc-9.0.0+r265378/obj-armv7hl-suse-linux-gnueabi/./gcc/
-B/usr/armv7hl-suse-linux-gnueabi/bin/ -B/usr/armv7hl-suse-linux-gnueabi/lib/
-isystem /usr/armv7hl-suse-linux-gnueabi/include -isystem
/usr/armv7hl-suse-linux-gnueabi/sys-include -O2 -g -I . -c
-fgo-pkgpath=math/cmplx ../../../libgo/go/math/cmplx/abs.go
../../../libgo/go/math/cmplx/asin.go ../../../libgo/go/math/cmplx/conj.go
../../../libgo/go/math/cmplx/exp.go ../../../libgo/go/math/cmplx/isinf.go
../../../libgo/go/math/cmplx/isnan.go ../../../libgo/go/math/cmplx/log.go
../../../libgo/go/math/cmplx/phase.go ../../../libgo/go/math/cmplx/polar.go
../../../libgo/go/math/cmplx/pow.go ../../../libgo/go/math/cmplx/rect.go
../../../libgo/go/math/cmplx/sin.go ../../../libgo/go/math/cmplx/sqrt.go
../../../libgo/go/math/cmplx/tan.go  -fPIC -o math/.libs/cmplx.o
[ 6365s] libtool: compile: 
/home/abuild/rpmbuild/BUILD/gcc-9.0.0+r265378/obj-armv7hl-suse-linux-gnueabi/./gcc/gccgo
-B/home/abuild/rpmbuild/BUILD/gcc-9.0.0+r265378/obj-armv7hl-suse-linux-gnueabi/./gcc/
-B/usr/armv7hl-suse-linux-gnueabi/bin/ -B/usr/armv7hl-suse-linux-gnueabi/lib/
-isystem /usr/armv7hl-suse-linux-gnueabi/include -isystem
/usr/armv7hl-suse-linux-gnueabi/sys-include -O2 -g -I . -c
-fgo-pkgpath=internal/testlog ../../../libgo/go/internal/testlog/log.go -o
internal/testlog.o >/dev/null 2>&1
[ 6365s] runtime_sysinfo.go:1672:7: error: redefinition of '_HWCAP_IDIVA'
[ 6365s]  1672 | const _HWCAP_IDIVA = (1 << 17)
[ 6365s]   |   ^
[ 6365s] ../../../libgo/go/runtime/os_linux_arm.go:14:2: note: previous
definition of '_HWCAP_IDIVA' was here
[ 6365s]14 |  _HWCAP_IDIVA = 1 << 17
[ 6365s]   |  ^
[ 6365s] runtime_sysinfo.go:3152:7: error: redefinition of '_HWCAP_VFPv3'
[ 6365s]  3152 | const _HWCAP_VFPv3 = (1 << 13)
[ 6365s]   |   ^
[ 6365s] ../../../libgo/go/runtime/os_linux_arm.go:13:2: note: previous
definition of '_HWCAP_VFPv3' was here
[ 6365s]13 |  _HWCAP_VFPv3 = 1 << 13 // introduced in 2.6.30
[ 6365s]   |  ^
[ 6365s] runtime_sysinfo.go:5579:7: error: redefinition of '_HWCAP_VFP'
[ 6365s]  5579 | const _HWCAP_VFP = (1 << 6)
[ 6365s]   |   ^
[ 6365s] ../../../libgo/go/runtime/os_linux_arm.go:12:2: note: previous
definition of '_HWCAP_VFP' was here
[ 6365s]12 |  _HWCAP_VFP   = 1 << 6  // introduced in at least 2.6.11
[ 6365s]   |  ^

Any idea what can be wrong?

[Bug target/87723] New: ICE: output_operand: invalid %-code on s390x

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87723

Bug ID: 87723
   Summary: ICE: output_operand: invalid %-code on s390x
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu, s390x-linux-gnu
Target: s390x-linux-gnu

Seen both on native and cross-compiler:

$ cat ice.i
unsigned long a;
int b;
void c(char* i) {
  for (;;) {
char g = 0;
for (; g < 24; ++g)
  b = a << g | a >> 64 - g;
{
  char *d = i;
  long h = b;
  char e = 0;
  for (; e < 8; ++e)
d[e] = h;
}
char *d = i;
signed e;
unsigned long f = 0;
e = 7;
for (; e; --e) {
  f <<= 8;
  f |= d[e];
}
for (; e < 8; ++e)
  d[e] = f;
  }
}

$ /home/marxin/Programming/gcc2/objdir2/gcc/xgcc
-B/home/marxin/Programming/gcc2/objdir2/gcc/ -O3 -S -march=z196 -m64 -mzarch
ice.i
during RTL pass: final
ice.i: In function ‘c’:
ice.i:26:1: internal compiler error: output_operand: invalid %-code
   26 | }
  | ^
0x9bf140 output_operand_lossage(char const*, ...)
../../gcc/final.c:3600
0x9bfd68 output_asm_insn(char const*, rtx_def**)
../../gcc/final.c:3969
0x9c10a1 final_scan_insn_1
../../gcc/final.c:3103
0x9c14db final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
../../gcc/final.c:3149
0x9c17d6 final_1
../../gcc/final.c:2019
0x9c28e8 rest_of_handle_final
../../gcc/final.c:4649
0x9c28e8 execute
../../gcc/final.c:4723

[Bug target/87723] ICE: output_operand: invalid %-code on s390x

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87723

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2018-10-24
 CC||krebbel at gcc dot gnu.org,
   ||uweigand at gcc dot gnu.org
   Target Milestone|--- |9.0

[Bug c++/87724] New: gcc allows narrowing conversions in converted constant expressions

2018-10-24 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87724

Bug ID: 87724
   Summary: gcc allows narrowing conversions in converted constant
expressions
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: blitzrakete at gmail dot com
  Target Milestone: ---

Compiled with -std=c++17 (https://godbolt.org/z/fO32Pd)

int main() {
  static_assert(2); // ill-formed, gcc accepts
  if constexpr (2); // ill-formed, gcc accepts
}

2 doesn't fit in a bool, and as such it is a narrowing conversion and fails to
be a "contextually converted constant expression of type bool" as per
[expr.const]p5.

[Bug ada/87715] problems with asan and -O3 build of ada

2018-10-24 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87715

--- Comment #2 from David Binderman  ---
(In reply to Martin Liška from comment #1)
> Interesting, let me try to reproduce that. Note that using -O3 can't be
> problem as it's supposed to do only valid code transformations.

Indeed. O3 isn't the problem. Only -O2 and ada required. Here is a stack
backtrace for more detail.

==27827==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address
0x7fffabf0ac47 at pc 0x01b9656c bp 0x7fffabf0a530 sp 0x7fffabf0a528
READ of size 1 at 0x7fffabf0ac47 thread T0
#0 0x1b9656b in switch__c__scan_front_end_switches
../../trunk/gcc/ada/switch-c.adb:302
#1 0x1bd3446 in back_end__scan_compiler_arguments
../../trunk/gcc/ada/back_end.adb:387
#2 0x1bd3da4 in _ada_gnat1drv ../../trunk/gcc/ada/gnat1drv.adb:1049
#3 0x13e572d in gnat_parse_file
../../trunk/gcc/ada/gcc-interface/misc.c:119

Line 302 is 

   C := Switch_Chars (Ptr);

[Bug tree-optimization/84013] wrong __restrict clique with inline asm operand

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84013

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||9.0
 Resolution|--- |FIXED

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug tree-optimization/84013] wrong __restrict clique with inline asm operand

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84013

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Wed Oct 24 09:42:19 2018
New Revision: 265455

URL: https://gcc.gnu.org/viewcvs?rev=265455&root=gcc&view=rev
Log:
2018-10-24  Richard Biener  

PR tree-optimization/84013
* tree-ssa-structalias.c (struct msdi_data): New struct for
marshalling data to walk_stmt_load_store_ops.
(maybe_set_dependence_info): Refactor as callback for
walk_stmt_load_store_ops.
(compute_dependence_clique): Set restrict info on all stmt kinds.

* gcc.dg/tree-ssa/restrict-9.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/restrict-9.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-structalias.c

This Week’s Fuel Prices

2018-10-24 Thread MEDCO sal
This Week’s Fuel Prices
if you can’t see the image below you can find it here 
(https://gfcmedia.com/medco/)

https://gfcmedia.com/medco/

Energetically Yours, MEDCO

To Stop Receiving our Emails, Please Reply with: REMOVE

( Some emails are scheduled in advanced, remove may take up some time )

Sent by GFC.media (https://gfcmedia.com/medco)   |  Unsubscribe 
(https://gfcmedia.com/register/)   |  Report Spam 
(https://gfcmedia.com/register/)

http://gfcmedia.com/
Send your emails with GFC and reach more audience
Beirut (+961) 71 629 666  Dubai (+971) 5  5 338

Disclaimer: GFC is not responsible for any contents linked to this email, as 
they are only related to the advertiser and do not represent GFC in any way.

This email was sent to gcc-bugs@gcc.gnu.org (mailto:gcc-bugs@gcc.gnu.org)
why did I get this? 
(https://battleparkae.us19.list-manage.com/about?u=90bac0906b280fc6945d7b273&id=4a9f8b0547&e=9a0a13d120&c=e87f61e6a7)
 unsubscribe from this list 
(https://battleparkae.us19.list-manage.com/unsubscribe?u=90bac0906b280fc6945d7b273&id=4a9f8b0547&e=9a0a13d120&c=e87f61e6a7)
 update subscription preferences 
(https://battleparkae.us19.list-manage.com/profile?u=90bac0906b280fc6945d7b273&id=4a9f8b0547&e=9a0a13d120)
BP AE . UAE . Dubai  . United Arab Emirates

[Bug libgomp/87725] New: OpenMP 4.5 clause schedule(simd,monotonic:static) not understood

2018-10-24 Thread as at cmplx dot uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87725

Bug ID: 87725
   Summary: OpenMP 4.5 clause schedule(simd,monotonic:static) not
understood
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
  Assignee: unassigned at gcc dot gnu.org
  Reporter: as at cmplx dot uk
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

OpenMP 4.5 specifications say that
schedule clause can have 2 modifiers,
specifically this should be valid:

!$omp do schedule(simd,monotonic:static)

But gfortran9 rejects this with:

21 | !$omp do schedule(simd,monotonic:static, n/nthr )
   |  1
Error: Unclassifiable OpenMP directive at (1)

Intel Fortran 18 does accept the above
construct with 2 schedule modifiers.

Using only a single modifier is accepted by gfortran9, i.e:

!$omp do schedule( simd:static )
!$omp do schedule( monotonic:static )

are both fine.

I guess this just hasn't been implemented yet?

A complete program:
use, intrinsic :: iso_fortran_env
use :: omp_lib
implicit none
integer :: i, val, tid, nthr, sum, part, n
  write (*,*) "OMP version:", openmp_version
n = 2**30
  sum = 0
!$omp parallel default( none )   &
!$omp private( tid, i, part, nthr ) &
!$omp shared( sum, n )
  part = 0
  nthr = omp_get_num_threads()
   tid = omp_get_thread_num()
  write (*,*) tid, nthr
! !$omp do schedule(simd,monotonic:static, n/nthr )
!$omp do schedule(simd:static, n/nthr )
! !$omp do schedule(monotonic:static, n/nthr )
 do i=1,n
part = part + 1
 end do
!$omp end do nowait
 !$omp atomic
   sum = sum + part
 !$omp end atomic
!$omp end parallel
write (*,*) sum, ( sum .eq. n )
end

[Bug target/87702] [6/7/8/9 Regression] Segfault in glibc if compiled with -march=amdfam10 -O2 (x86)

2018-10-24 Thread mihail.zenkov at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87702

--- Comment #7 from Mihail Zenkov  ---
http://www.knk.uwebweb.com/glibc-segfault-2.tar.xz

I put full command line into exit.cmd and vfscanf.cmd.

[Bug c++/87724] gcc allows narrowing conversions in converted constant expressions

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87724

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |SUSPENDED
   Last reconfirmed||2018-10-24
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
CWG has been discussing this and the consensus seems to be that both examples
are OK. We certainly shouldn't make any change to GCC until CWG makes a final
decision.

[Bug c++/87726] New: -fdebug-prefix-map doesn't work with lto

2018-10-24 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87726

Bug ID: 87726
   Summary: -fdebug-prefix-map doesn't work with lto
   Product: gcc
   Version: lto
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ville.voutilainen at gmail dot com
  Target Milestone: ---

Created attachment 44887
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44887&action=edit
Test application

With the attached source, uncommenting the lto flags at the top of the Makefile
lead to a linker error when making the source. The source needs the development
headers and libs for dwarf and dw.

This problem breaks the attempts to build boot2qt with lto enabled with yocto.

[Bug tree-optimization/15089] local register variable with a specified register is bad

2018-10-24 Thread ilya.lesokhin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15089

Ilya Lesokhin  changed:

   What|Removed |Added

 CC||ilya.lesokhin at gmail dot com

--- Comment #26 from Ilya Lesokhin  ---
Created attachment 44888
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44888&action=edit
Test case demonstrating the problem

Looks like issue still exists.

#include 


uint64_t test() {
  register uint64_t t0;
  register uint64_t t1;
  register uint64_t t2 ;
  register uint64_t rdx;
  register uint64_t r0 asm("rsi");
  register uint64_t r1 ;
  register uint64_t r2 ;
  register uint64_t r3 ;
  register uint64_t m3;
  register uint64_t y0;
  register uint64_t y1;
  register uint64_t y2;
  register uint64_t y3;


  asm(
 "mov %[res0],%[res0]"
  : "=&d"(rdx), [res0] "=&r"(r0), [res1] "=&r"(r1), [res2] "=&r"(r2),
[res3] "=&r"(r3),
[t0] "=&r"(t0), [t1] "=&r"(t1), [t2] "=&r"(t2)
  : [m3] "r"(m3), [y0] "r"(y0), [y1] "r"(y1), [y2] "r"(y2)
  : "cc");



return r0;
}

Results in:

test():
 push   %r14
 xor%eax,%eax
 xor%ecx,%ecx
 push   %rbp
 xor%esi,%esi
 xor%edi,%edi
 push   %rbx
 mov%r14,%r14  <- should be rsi.
 mov%r14,%rax
 pop%rbx
 pop%rbp
 pop%r14
 retq   


https://godbolt.org/z/RLTDbY

[Bug tree-optimization/87105] Autovectorization [X86, SSE2, AVX2, DoublePrecision]

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87105

--- Comment #13 from Richard Biener  ---
Author: rguenth
Date: Wed Oct 24 11:46:58 2018
New Revision: 265457

URL: https://gcc.gnu.org/viewcvs?rev=265457&root=gcc&view=rev
Log:
2018-10-24  Richard Biener  

PR tree-optimization/87105
* tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
dump classification.
(vect_analyze_data_ref_accesses): Handle duplicate loads and
stores by splitting the affected group after the fact.
* tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
fail the SLP build because of size constraints.

* gcc.dg/vect/bb-slp-39.c: New testcase.
* gfortran.dg/vect/pr83232.f90: Un-XFAIL.

Added:
trunk/gcc/testsuite/gcc.dg/vect/bb-slp-39.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/vect/pr83232.f90
trunk/gcc/tree-vect-data-refs.c
trunk/gcc/tree-vect-slp.c

[Bug sanitizer/84629] sanitizer warnings and errors on Linux

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84629

--- Comment #6 from Martin Liška  ---
I'm curious about:

/home/marxin/Programming/gcc/libsanitizer/sanitizer_common/sanitizer_linux.cc:
In function ‘void* __sanitizer::internal_start_thread(void (*)(void*), void*)’:
/home/marxin/Programming/gcc/libsanitizer/sanitizer_common/sanitizer_linux.cc:1733:58:
warning: cast between incompatible function types from ‘void (*)(void*)’ to
‘void* (*)(void*)’ [-Wcast-function-type]
 1733 |   real_pthread_create(&th, nullptr, (void*(*)(void *arg))func, arg);
  |  ^~~~


Shouldn't something like:

diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc
b/libsanitizer/sanitizer_common/sanitizer_linux.cc
index f1f70ec57fc..7571ff9b25d 100644
--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
@@ -1719,7 +1719,7 @@ HandleSignalMode GetHandleSignalMode(int signum) {
 }

 #if !SANITIZER_GO
-void *internal_start_thread(void(*func)(void *arg), void *arg) {
+void *internal_start_thread(void*(*func)(void *arg), void *arg) {
   // Start the thread with signals blocked, otherwise it can steal user
signals.
   __sanitizer_sigset_t set, old;
   internal_sigfillset(&set);
@@ -1730,7 +1730,7 @@ void *internal_start_thread(void(*func)(void *arg), void
*arg) {
 #endif
   internal_sigprocmask(SIG_SETMASK, &set, &old);
   void *th;
-  real_pthread_create(&th, nullptr, (void*(*)(void *arg))func, arg);
+  real_pthread_create(&th, nullptr, func, arg);
   internal_sigprocmask(SIG_SETMASK, &old, nullptr);
   return th;
 }
@@ -1739,7 +1739,7 @@ void internal_join_thread(void *th) {
   real_pthread_join(th, nullptr);
 }
 #else
-void *internal_start_thread(void (*func)(void *), void *arg) { return 0; }
+void *internal_start_thread(void *(*func)(void *), void *arg) { return 0; }

 void internal_join_thread(void *th) {}
 #endif

by applied to libsanitizer mainline?

[Bug rtl-optimization/87720] [9 Regression] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

Richard Biener  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org
  Component|regression  |rtl-optimization
Version|unknown |9.0
   Target Milestone|--- |9.0
Summary|[MIPS] ICE: |[9 Regression] [MIPS] ICE:
   |gcc.c-torture/execute/built |gcc.c-torture/execute/built
   |ins/lib/chk.c:33:1: in  |ins/lib/chk.c:33:1: in
   |int_mode_for_mode, at   |int_mode_for_mode, at
   |stor-layout.c:403 after |stor-layout.c:403 after
   |r265398 |r265398

[Bug rtl-optimization/87727] New: [9 regression] gcc.target/sparc/overflow-2.c FAILs

2018-10-24 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87727

Bug ID: 87727
   Summary: [9 regression] gcc.target/sparc/overflow-2.c FAILs
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ro at gcc dot gnu.org
CC: ebotcazou at gcc dot gnu.org
  Target Milestone: ---
Target: sparc-sun-solaris2.*

Between 20181022 (r265393) and 20181023 (r265430),
gcc.target/sparc/overflow-2.c
started to FAIL:

+FAIL: gcc.target/sparc/overflow-2.c scan-assembler-not save\\t%

I'm attaching old and current assembler output.

[Bug rtl-optimization/87727] [9 regression] gcc.target/sparc/overflow-2.c FAILs

2018-10-24 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87727

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |9.0

[Bug rtl-optimization/87727] [9 regression] gcc.target/sparc/overflow-2.c FAILs

2018-10-24 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87727

--- Comment #1 from Rainer Orth  ---
Created attachment 44889
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44889&action=edit
previous overflow-2.s

[Bug tree-optimization/87728] New: inline asm not optimized on GIMPLE

2018-10-24 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87728

Bug ID: 87728
   Summary: inline asm not optimized on GIMPLE
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: amonakov at gcc dot gnu.org
  Target Milestone: ---

PR 63900 points out a case where RTL CSE fails to clean up redundant loads in
presence of BLKmode accesses, but there really isn't anything in that testcase
that GCC shouldn't be able to clean up in GIMPLE. It seems GIMPLE optimizations
are too conservative with regards to asm statements.

For the simple testcase

int f()
{
int a=0, b;
asm("# %0 %1" : "=m"(b) : "m"(a));
return a;
}

the asm is dead and this should become 'return 0;', but in .optimized dump we
still have

f ()
{
  int b;
  int a;
  int _4;

   :
  a = 0;
  __asm__("# %0 %1" : "=m" b : "m" a);
  _4 = a;
  a ={v} {CLOBBER};
  b ={v} {CLOBBER};
  return _4;
}

[Bug rtl-optimization/87727] [9 regression] gcc.target/sparc/overflow-2.c FAILs

2018-10-24 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87727

--- Comment #2 from Rainer Orth  ---
Created attachment 44890
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44890&action=edit
current overflow-2.s

[Bug inline-asm/63900] memory constrains needlessly doing memory clobber

2018-10-24 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63900

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org

--- Comment #10 from Alexander Monakov  ---
No, as mentioned in comment 3 there aren't any "full memory clobbers" anywhere,
the title of the bug is inaccurate. The original testcase shows that under
specific circumstances RTL optimizations fail to clean up redundant loads; your
testcase does not reproduce those circumstances.

FWIW it's a technically missed-optimization for GIMPLE passes as well, GCC
could have cleaned this up without relying on RTL passes: PR 87728.

[Bug rtl-optimization/87720] [9 Regression] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread paul.hua.gm at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

--- Comment #2 from Paul Hua  ---
untested patch:

Index: gcc/combine.c
===
--- gcc/combine.c   (revision 265456)
+++ gcc/combine.c   (working copy)
@@ -14965,7 +14965,11 @@
  if (TEST_HARD_REG_BIT (fixed_reg_set, REGNO (src)))
continue;

- rtx new_reg = gen_reg_rtx (GET_MODE (dest));
+ rtx new_reg;
+ if (GET_CODE(dest) == PC)
+   new_reg = gen_reg_rtx (GET_MODE (src));
+ else
+   new_reg = gen_reg_rtx (GET_MODE (dest));
  rtx_insn *insn1 = gen_move_insn (new_reg, src);
  rtx_insn *insn2 = gen_move_insn (dest, new_reg);
  emit_insn_after (insn1, insn);
Index: gcc/expr.c
===
--- gcc/expr.c  (revision 265456)
+++ gcc/expr.c  (working copy)
@@ -3684,7 +3684,12 @@
 rtx_insn *
 emit_move_insn_1 (rtx x, rtx y)
 {
-  machine_mode mode = GET_MODE (x);
+  machine_mode mode;
+  if (GET_CODE (x) == PC)
+mode = GET_MODE (y);
+  else /* Include  (GET_CODE (y) = PC) */
+mode = GET_MODE (x);
+
   enum insn_code code;

   gcc_assert ((unsigned int) mode < (unsigned int) MAX_MACHINE_MODE);

[Bug c++/86288] Recognize __gnu and/or __gnu__ as attribute-namespace

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86288

--- Comment #5 from Jonathan Wakely  ---
Clang has now implemented this as a special case, only recognizing "__gnu__" as
a synonym for the "gnu" attribute-namespace. That's fine for libstdc++'s
purposes, as I don't expect we'll start using any other vendor attributes.

EDG have also been told about this, so compilers based on their front end
should also be able to recognize [[__gnu__::__blah__]] at some point.

[Bug go/87722] [9 Regression] go bootstrap is broken on armv7l target

2018-10-24 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87722

Ian Lance Taylor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Ian Lance Taylor  ---
Dup of 87661, which should have been fixed by revision 265439.

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

[Bug go/87661] [9 Regression] libgo bootstrap failure on arm-linux-gnueabihf (redefinition of constants)

2018-10-24 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87661

Ian Lance Taylor  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #3 from Ian Lance Taylor  ---
*** Bug 87722 has been marked as a duplicate of this bug. ***

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

2018-10-24 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87729

Bug ID: 87729
   Summary: Please include -Woverloaded-virtual in -Wall
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzi...@poradnik-webmastera.com
  Target Milestone: ---

clang includes -Woverloaded-virtual in -Wall. Please do same for gcc.

[Bug preprocessor/87730] New: Warn about misuses of __has_include_next

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87730

Bug ID: 87730
   Summary: Warn about misuses of __has_include_next
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: enhancement
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
Blocks: 87403
  Target Milestone: ---

Clang has some nice warnings for dubious uses of __has_include_next.

Given:

#if __has_include_next()
#endif

In the main file being compiled this produces:

foo.cc:1:5: warning: #include_next in primary source file
[-Winclude-next-outside-header]
#if __has_include_next()
^

and in an included header it produces:

In file included from foo.cc:1:
./foo.h:1:5: warning: #include_next with absolute path
[-Winclude-next-absolute-path]
#if __has_include_next()
^


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

[Bug preprocessor/80753] __has_include and __has_include_next taints subsequent I/O errors

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80753

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 Ever confirmed|0   |1

[Bug preprocessor/80753] __has_include and __has_include_next taints subsequent I/O errors

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80753

--- Comment #2 from Jonathan Wakely  ---
This means the following paradox compiles OK:

#if ! __has_include()
# include 
#endif

[Bug c++/87731] New: Detection of mismatched alloc/free pairs

2018-10-24 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731

Bug ID: 87731
   Summary: Detection of mismatched alloc/free pairs
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzi...@poradnik-webmastera.com
  Target Milestone: ---

Following code compiles cleanly on gcc:

void foo()
{
char* c = new char[4];
delete c;
}

When it is compiles using clang 7.0.0, it generates following warning. Please
do the same in gcc.

:4:5: warning: 'delete' applied to a pointer that was allocated with
'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete c;
^
  []
:3:15: note: allocated with 'new[]' here
char* c = new char[4];
  ^
1 warning generated.
Compiler returned: 0

Valgrind also has similar diagnostics, it checks checks following pairs by
default: malloc/free, new/delete, new[]/delete[]. Please implement something
similar in gcc.

Valgrind also provides set of macros which allows it to track custom alloc/free
functions. It would be nice if you add new attributes which could be attached
to custom alloc and free functions, so gcc could check pairing for them too. I
think of something like this:

__attribute__((malloc("MyAllocType")))
void* MyAlloc(size_t);

__attribute__((free("MyAllocType")))
void MyFree(void*);

[Bug c++/87732] New: Detect and eliminate unnecessary alloc/free pairs

2018-10-24 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87732

Bug ID: 87732
   Summary: Detect and eliminate unnecessary alloc/free pairs
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzi...@poradnik-webmastera.com
  Target Milestone: ---

[code]
void foo()
{
char* c = new char[4];
delete[] c;
}
[/code]

gcc with -O3 generates this:

[asm]
foo():
sub rsp, 8
mov edi, 4
calloperator new[](unsigned long)
add rsp, 8
mov rdi, rax
jmp operator delete[](void*)
[/asm]

clang 7.0.0 is able to remove unnecessary alloc/free pair:

[asm]
foo():# @foo()
ret
[/asm]

Please do similar thing in gcc too.

[Bug c++/87732] Detect and eliminate unnecessary alloc/free pairs

2018-10-24 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87732

--- Comment #1 from Daniel Fruzynski  ---
New warning for this also would be welcome.

[Bug inline-asm/87733] New: local register variable not honored with earlyclobber

2018-10-24 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87733

Bug ID: 87733
   Summary: local register variable not honored with earlyclobber
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ra
  Severity: normal
  Priority: P3
 Component: inline-asm
  Assignee: unassigned at gcc dot gnu.org
  Reporter: amonakov at gcc dot gnu.org
CC: ilya.lesokhin at gmail dot com
  Target Milestone: ---

GCC fails to allocate %rsi for the first operand of the asm at -O2:

int test()
{
register int r0 asm("rsi");
asm("# %0 %1" : "=&r"(r0) : "r"(0));
return r0;
}

test:
.cfi_startproc
xorl%esi, %esi
#APP
# %eax %esi
#NO_APP
ret

[Bug tree-optimization/15089] local register variable with a specified register is bad

2018-10-24 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15089

Alexander Monakov  changed:

   What|Removed |Added

 CC||amonakov at gcc dot gnu.org
  Known to fail|tree-ssa|

--- Comment #27 from Alexander Monakov  ---
No, this is a different issue (local reg var not honored for an earlyclobber
operand), and it's better to have a separate bug: PR 87733.

[Bug c++/87732] Detect and eliminate unnecessary new/delete pairs

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87732

Richard Biener  changed:

   What|Removed |Added

Summary|Detect and eliminate|Detect and eliminate
   |unnecessary alloc/free  |unnecessary new/delete
   |pairs   |pairs

--- Comment #2 from Richard Biener  ---
We can do this for malloc/free but not for new/delete.  DCE does this.

[Bug tree-optimization/87728] inline asm not optimized on GIMPLE

2018-10-24 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87728

Richard Biener  changed:

   What|Removed |Added

   Keywords||alias
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 CC||rguenth at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Primary cause:

/* If the statement STMT may clobber the memory reference REF return true,
   otherwise return false.  */

bool
stmt_may_clobber_ref_p_1 (gimple *stmt, ao_ref *ref, bool tbaa_p)
{
...
  else if (gimple_code (stmt) == GIMPLE_ASM)
return true;

similarly ref_maybe_used_by_stmt_p ().

Not sure if really worth the trouble though.

[Bug rtl-optimization/87727] [9 regression] gcc.target/sparc/overflow-2.c FAILs

2018-10-24 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87727

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 Ever confirmed|0   |1

--- Comment #3 from Eric Botcazou  ---
Most likely r265398, i.e. another far-reaching RTL change like r264897.

[Bug c++/84436] [8/9 Regression] Missed optimization with switch on enum constants returning the same value

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84436

--- Comment #8 from Martin Liška  ---
Author: marxin
Date: Wed Oct 24 13:52:21 2018
New Revision: 265463

URL: https://gcc.gnu.org/viewcvs?rev=265463&root=gcc&view=rev
Log:
Switch conversion: support any ax + b transformation (PR
tree-optimization/84436).

2018-10-24  Martin Liska  

PR tree-optimization/84436
* tree-switch-conversion.c (switch_conversion::contains_same_values_p):
Remove.
(switch_conversion::contains_linear_function_p): New.
(switch_conversion::build_one_array): Support linear
transformation on input.
* tree-switch-conversion.h (struct switch_conversion): Add
contains_linear_function_p declaration.
2018-10-24  Martin Liska  

PR tree-optimization/84436
* gcc.dg/tree-ssa/pr84436-1.c: New test.
* gcc.dg/tree-ssa/pr84436-2.c: New test.
* gcc.dg/tree-ssa/pr84436-3.c: New test.
* gcc.dg/tree-ssa/pr84436-4.c: New test.
* gcc.dg/tree-ssa/pr84436-5.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-2.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-3.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-switch-conversion.c
trunk/gcc/tree-switch-conversion.h

[Bug c++/84436] [8/9 Regression] Missed optimization with switch on enum constants returning the same value

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84436

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Martin Liška  ---
Implemented.

[Bug rtl-optimization/87720] [9 Regression] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

--- Comment #3 from Segher Boessenkool  ---
Hi Paul,

How can the mode of dest be different from that of the source?  How does PC
get into this?  Could you show an example of bad / good RTL?

[Bug ipa/85103] [8/9 Regression] Performance regressions on SPEC with r257582

2018-10-24 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85103

David Edelsohn  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org

--- Comment #11 from David Edelsohn  ---
Still waiting for improvement.

[Bug fortran/87734] New: ICE in is_illegal_recursion check for character len= parameter

2018-10-24 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87734

Bug ID: 87734
   Summary: ICE in is_illegal_recursion check for character len=
parameter
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aldot at gcc dot gnu.org
  Target Milestone: ---

Created attachment 44891
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44891&action=edit
reduced from flibs-svncode/trunk/src/strings/m_vstring.f90 --
sf.net/projects/flibs

flibs-svncode/trunk/src/strings/m_vstring.f90

Builds fine with gfortran-4.8
ICEs with current trunk:

$ gfortran -c -o a.o m_vstring.f90

f951: internal compiler error: in is_illegal_recursion, at
fortran/resolve.c:1688
0x93f623 is_illegal_recursion
../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:1688
0x942ff8 resolve_function
../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:3294
0x94b2f7 gfc_resolve_expr(gfc_expr*)
../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:6809
0x8b7256 gfc_reduce_init_expr(gfc_expr*)
../../../src/gcc-9.0.mine/gcc/fortran/expr.c:2799
0x896d3a gfc_match_char_spec(gfc_typespec*)
../../../src/gcc-9.0.mine/gcc/fortran/decl.c:3261
0x89860a gfc_match_decl_type_spec(gfc_typespec*, int)
../../../src/gcc-9.0.mine/gcc/fortran/decl.c:3904
0x89ba26 gfc_match_data_decl()
../../../src/gcc-9.0.mine/gcc/fortran/decl.c:5831
0x9265dd match_word
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:65
0x927190 decode_statement
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:376
0x92bca0 next_free
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:1234
0x92c23f next_statement
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:1466
0x92f6c4 parse_spec
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:3860
0x93267d parse_progunit
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:5671
0x93236d parse_contained
../../../src/gcc-9.0.mine/gcc/fortran/parse.c:5574
0x932d61 parse_module

(gdb) up
#1  0x0093f624 in is_illegal_recursion (sym=0x2ec81a0, 
context=0x2ecbc80) at ../../../src/gcc-9.0.mine/gcc/fortran/resolve.c:1688
1688  gcc_assert (sym->attr.flavor == FL_PROCEDURE);
(gdb) p sym->name
$1 = 0x770ce6a0 "vstring_length"
(gdb) p sym->attr.flavor 
$2 = FL_UNKNOWN


PS: to build the full flibs you currently have to
svn checkout
# fix the most severe bugs in the config script:
sed -i -e 's/==/=/g' -e 's/@$\([0-9]\)/"@$\1"/g' configure.sh
OSTYPE=linux-gnu ./configure.sh
cd make/makefile
make

[Bug ipa/85103] [8/9 Regression] Performance regressions on SPEC with r257582

2018-10-24 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85103

--- Comment #12 from Bill Schmidt  ---
Does this qualify as a P2 bug?  This is a serious degradation not only on P7
but also P8 and P9.

[Bug c++/87731] Detection of mismatched alloc/free pairs

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 Blocks||87403
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
With -fsanitize=address GCC diagnoses it.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

[Bug c++/87732] Detect and eliminate unnecessary new/delete pairs

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87732

--- Comment #3 from Jonathan Wakely  ---
Looks like a dup of PR 78104

[Bug c++/87731] Detection of mismatched alloc/free pairs

2018-10-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731

--- Comment #2 from Jonathan Wakely  ---
(In reply to Daniel Fruzynski from comment #0)
> Valgrind also provides set of macros which allows it to track custom
> alloc/free functions. It would be nice if you add new attributes which could
> be attached to custom alloc and free functions, so gcc could check pairing
> for them too. I think of something like this:
> 
> __attribute__((malloc("MyAllocType")))
> void* MyAlloc(size_t);
> 
> __attribute__((free("MyAllocType")))
> void MyFree(void*);

That should be a separate enhancement request.

[Bug rtl-optimization/87720] [9 Regression] [MIPS] ICE: gcc.c-torture/execute/builtins/lib/chk.c:33:1: in int_mode_for_mode, at stor-layout.c:403 after r265398

2018-10-24 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87720

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-10-24
   Assignee|unassigned at gcc dot gnu.org  |segher at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Segher Boessenkool  ---
Okay I managed to build a cross-compiler.  Confirmed; needs -O1 but nothing
more.

(set (pc) (reg:SI 25))

Huh, why did this not happen on any of my builds.  I have a patch.

[Bug other/87735] New: [9 regression] gcc.dg/tree-prof/time-profiler-1.c and -2.c and -3.c fail starting with 265454

2018-10-24 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87735

Bug ID: 87735
   Summary: [9 regression] gcc.dg/tree-prof/time-profiler-1.c and
-2.c and -3.c fail starting with 265454
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

> FAIL: gcc.dg/tree-prof/time-profiler-1.c scan-ipa-dump-times profile "Read 
> tp_first_run: 1" 1
> FAIL: gcc.dg/tree-prof/time-profiler-2.c scan-ipa-dump-times profile "Read 
> tp_first_run: 1" 2
> FAIL: gcc.dg/tree-prof/time-profiler-3.c scan-ipa-dump-times profile "Read 
> tp_first_run: 1" 1


Executing on host: /home/seurer/gcc/build/gcc-trunk/gcc/xgcc
-B/home/seurer/gcc/build/gcc-trunk/gcc/
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c   
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never   -O2 -fdump-ipa-profile -fprofile-use -D_PROFILE_USE
 -lm  -o
/home/seurer/gcc/build/gcc-trunk/gcc/testsuite/gcc8/time-profiler-1.x02   
(timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-trunk/gcc/xgcc
-B/home/seurer/gcc/build/gcc-trunk/gcc/
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -O2 -fdump-ipa-profile -fprofile-use -D_PROFILE_USE
-lm -o /home/seurer/gcc/build/gcc-trunk/gcc/testsuite/gcc8/time-profiler-1.x02
PASS: gcc.dg/tree-prof/time-profiler-1.c compilation,  -fprofile-use
-D_PROFILE_USE
Setting LD_LIBRARY_PATH to
:/home/seurer/gcc/build/gcc-trunk/gcc:/home/seurer/gcc/build/gcc-trunk/powerpc64-unknown-linux-gnu/./libatomic/.libs::/home/seurer/gcc/build/gcc-trunk/gcc:/home/seurer/gcc/build/gcc-trunk/powerpc64-unknown-linux-gnu/./libatomic/.libs:/home/seurer/gcc/build/gcc-trunk/./gmp/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-gmp/.libs:/home/seurer/gcc/build/gcc-trunk/./mpfr/src/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-mpfr/src/.libs:/home/seurer/gcc/build/gcc-trunk/./mpc/src/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-mpc/src/.libs:/home/seurer/gcc/build/gcc-trunk/./isl/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-isl/.libs:/home/seurer/gcc/install/gcc-7.2.0/lib64
Execution timeout is: 300
spawn [open ...]
PASS: gcc.dg/tree-prof/time-profiler-1.c execution,-fprofile-use
-D_PROFILE_USE
gcc.dg/tree-prof/time-profiler-1.c: pattern found 0 times
FAIL: gcc.dg/tree-prof/time-profiler-1.c scan-ipa-dump-times profile "Read
tp_first_run: 1" 1
PASS: gcc.dg/tree-prof/time-profiler-1.c scan-ipa-dump-times profile "Read
tp_first_run: 2" 1
PASS: gcc.dg/tree-prof/time-profiler-1.c scan-ipa-dump-times profile "Read
tp_first_run: 3" 1

[Bug fortran/87734] ICE in is_illegal_recursion check for character len= parameter

2018-10-24 Thread aldot at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87734

Bernhard Reutner-Fischer  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Known to work||4.8.4, 4.9.2
Version|unknown |9.0
   Target Milestone|--- |9.0
  Known to fail||6.4.0, 7.3.0, 8.2.0

Don’t be dirty

2018-10-24 Thread Gina Cianfrone
Hi Enrique,

Nobody is at their most productive while working in a filthy environment.
Bring the experts in to keep it clean!

We will ensure your space is always clean from top to bottom. Vanguard
Cleaning Systems has been the trusted cleaning partner of countless
companies across America for over 30 years, and we’d love for you to be
next.

May I give you a complimentary cleaning quote?

​Have a great day! ---
Gina Cianfrone
Vice President of Marketing
Vanguard Cleaning Systems of Northern New Jersey

Read what our valued clients have to say:

"Vanguard Cleaning Service has provided cleaning services for The
Cardiovascular Care Group in all three of our locations in Clifton, Springfield,
and Westfield since 2008. They have proven to be both reliable and trustworthy.
They clean both offices and surgical suites daily. They have provided us with a
written policy to meet with our accreditation standards. They provide us 
additional
services like carpet and floor strip and wax at a reasonable price. They are 
truly a
full-service company." —Kathleen Demytrk, CFO, The Cardiovascular Care Group

© 2018 Vanguard Cleaning Systems of Northern New Jersey
Our address is 115 Route 46 West, Suite A-8, Mountain Lakes, New Jersey, 07046 

In order to unsubscribe from this mailing list, please click here 
http://email.vanguardnnj.com/c/eJx1kM1ugzAQhJ8GbrW867W9PnCo0uQ9jM1PUgOBQAJ5-rrXSpVG2k870kgzscK6seTKa4USGCQSGCQFAsQFzg5ZO3lSzvHpXJB8-rHb_BLH8SbCNJR9FVtqDLckTQzONK20tWRuYsQGW0--HCqLFhybMlX9ut4L9VngJWtdfPgWfxJ_LXXZt1SoLz1LqV_TDabhYYx8HzN4q-b9-Ur99KB2T-Zg7dPb2Xbdn4HC93FQdLIeouGEmubX2MN74vsQUKcCzX7NuV0IH_XWPXKfjKIbNzEtXblU_xhrtfpOgCapHIMjoYCJ80NpJpQyE-ahiDPZPJ82TmidD5gfHzJoFw


[Bug c++/87736] New: New attributes to mark custom alloc/free function pair

2018-10-24 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87736

Bug ID: 87736
   Summary: New attributes to mark custom alloc/free function pair
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzi...@poradnik-webmastera.com
  Target Milestone: ---

This is split from Bug 87731, as recommended by Jonathan Wakely:

Valgrind provides set of macros which allows it to track custom alloc/free
functions. It would be nice if you add new attributes which could be attached
to custom alloc and free functions, so gcc could check pairing for them too. I
think of something like this:

__attribute__((malloc("MyAllocType")))
void* MyAlloc(size_t);

__attribute__((free("MyAllocType")))
void MyFree(void*);

[Bug c++/87731] Detection of mismatched alloc/free pairs

2018-10-24 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731

--- Comment #3 from Daniel Fruzynski  ---
Logged Bug 87736 for new proposed attributes.

[Bug c++/87731] Detection of mismatched alloc/free pairs

2018-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #4 from Martin Sebor  ---
We have been discussing this feature for some time now.  Not just the
diagnostics but also the significant optimization opportunities here.

Detecting the simple cases is fairly easy but of only limited value.  The more
interesting cases are harder to handle (and Clang doesn't).  For example, the
bug in the common idiom below isn't diagnosed:

  void f (void*);

  void g (int n)
  {
char a[8];
char *p;
if (n <= 8)
  p = a;
else
  p = new char[n];

f (p);

if (p != a)
  delete p;
  }

I think marking up related sets of functions (like calloc/malloc/realloc +
free) is necessary for a general solution.  Otherwise it will be limited only
to the subset known/visible to the compiler: i.e., built-ins and inlined
functions.  Beyond function attributes like those suggested in comment #0, it
might be helpful to also provide a similar annotation for pointer variables
(especially members) so that the compiler can make assumptions about the
allocation/deallocation functions expected to be used with them even across
calls to functions without any annotation.

[Bug fortran/49627] NINT(x,16) doesn't work (at all, ever, I don't think)

2018-10-24 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49627

G. Steinmetz  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #6 from G. Steinmetz  ---

While pr65757 is solved, this still gives an ICE in my environment
in combination with a variable :


$ cat z1.f90
program test
  real(16) :: x = 2466840987.123067e0_16
  print *, nint(x, 16)
end


$ gfortran-9-20181021 -c z1.f90
z1.f90:3:0:

3 |print *, nint(x, 16)
  |
internal compiler error: in build_round_expr, at fortran/trans-intrinsic.c:396
0x702fec build_round_expr
../../gcc/fortran/trans-intrinsic.c:396
0x702fec build_fix_expr
../../gcc/fortran/trans-intrinsic.c:420
0x7030ca gfc_conv_intrinsic_int
../../gcc/fortran/trans-intrinsic.c:550
0x711947 gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-intrinsic.c:9202
0x6f7d04 gfc_conv_function_expr
../../gcc/fortran/trans-expr.c:6864
0x6ec45a gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7998
0x6f1e05 gfc_conv_expr_reference(gfc_se*, gfc_expr*, bool)
../../gcc/fortran/trans-expr.c:8143
0x7182b7 gfc_trans_transfer(gfc_code*)
../../gcc/fortran/trans-io.c:2584
0x6bdbc7 trans_code
../../gcc/fortran/trans.c:2038
0x715dae build_dt
../../gcc/fortran/trans-io.c:2026
0x6bdba7 trans_code
../../gcc/fortran/trans.c:2010
0x6e51c4 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6505
0x673426 translate_all_program_units
../../gcc/fortran/parse.c:6125
0x673426 gfc_parse_file()
../../gcc/fortran/parse.c:6328
0x6ba3ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204



Works with a parameter/constant instead :

$ cat z2.f90
program test
   real(16), parameter :: x = 2466840987.123067e0_16
   print *, nint(x, 16)
end

$ gfortran-9-20181021 -static-libgfortran z2.f90
$ a.out
 2466840987

[Bug fortran/67760] ICE on contained subroutine in function modifying function return value

2018-10-24 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67760

G. Steinmetz  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #3 from G. Steinmetz  ---

Update :


$ cat z1.f90
module m
   implicit none
contains
   function f()
  integer :: f(4)
  call s
   contains
  subroutine s
 f = 42
  end
   end
end
program p
   use m
   print *, f()
end


$ gfortran-9-20181021 -c z1.f90
z1.f90:4:0:

4 |function f()
  |
internal compiler error: stride.0 from s referenced in f
0xba2c19 convert_nonlocal_reference_op
../../gcc/tree-nested.c:1053
0xd59f65 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set >*))
../../gcc/tree.c:11513
0x8f1f1d walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:221
0x8f2128 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../gcc/gimple-walk.c:586
0x8f22d0 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:51
0x8f21d1 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../gcc/gimple-walk.c:595
0x8f22d0 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:51
0x8f21d1 walk_gimple_stmt(gimple_stmt_iterator*, tree_node*
(*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**,
int*, void*), walk_stmt_info*)
../../gcc/gimple-walk.c:595
0x8f22d0 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*,
bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:51
0xba0808 walk_body
../../gcc/tree-nested.c:703
0xba1008 walk_function
../../gcc/tree-nested.c:714
0xba1008 walk_all_functions
../../gcc/tree-nested.c:779
0xba4b60 lower_nested_functions(tree_node*)
../../gcc/tree-nested.c:3435
0x7b0383 cgraph_node::analyze()
../../gcc/cgraphunit.c:673
0x7b2e57 analyze_functions
../../gcc/cgraphunit.c:1126
0x7b3782 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2833

[Bug target/85669] fail on s-case-cfn-macros: build/gencfn-macros: DEF_INTERNAL_FLT/INT_FN (%smth%) has no associated built-in functions

2018-10-24 Thread dougmencken at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85669

--- Comment #11 from Douglas Mencken  ---
I’m bisecting yet

CC="ccache /Developer/GCC/7.3p/PowerPC/32bit/bin/gcc" \
CXX="ccache /Developer/GCC/7.3p/PowerPC/32bit/bin/g++" \
../gcc-build/configure \
--build=powerpc-unknown-darwin --host=powerpc-unknown-darwin
--target=powerpc-unknown-darwin \
--prefix=/Developer/GCC/7_to_8_bisecting/PowerPC/32bit \
--enable-languages=c,c++,objc,obj-c++ \
--enable-shared --enable-static \
--enable-checking=release \
--enable-threads=posix --with-__thread --without-system-zlib \
--disable-nls --disable-werror

make -j3 2>&1 | tee ../_7_to_8_bootstrap.log

iain.patch is needed for 7.3 before r257501 patch
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=257501
that is git commit 566f381623050c5af7ba9d02d05a5b9b1c046158
you may get it from https://ftp.osuosl.org/pub/manulix/other/GCC/iain.patch

$ git bisect start
$ git bisect good gcc-7_3_0-release # "good" as in it reaches stage3, patched
with iain.patch if it needs to
$ git bisect bad gcc-8_1_0-release # otherwise it’s "bad"
Bisecting: a merge base must be tested
[7369309777f6d6e630fb7763bcd08a0317727e36] [ARM] Fix type for .init_array.* and
.fini_array.* sections
$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
$ cat stage_current
stage3
$ git stash
$ git bisect good # 7369309777f6d6e630fb7763bcd08a0317727e36 # r247015
Bisecting: 4002 revisions left to test after this (roughly 12 steps)
[b50e3690fbcafedefdb888c2d66725b8f405706e] Add ChangeLog entries, missing from
last commit
$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
build/gencfn-macros: DEF_INTERNAL_INT_FN (PARITY) has no associated built-in
functions
make[3]: *** [s-case-cfn-macros] Error 1
$ cat stage_current
stage2
$ git stash
$ git bisect bad # b50e3690fbcafedefdb888c2d66725b8f405706e # r253946
Bisecting: 2001 revisions left to test after this (roughly 11 steps)
[61cb18166c6a1507af78ce73a4e3c8a21b0cb8ab]  * profile-count.h
(profile_probability::from_reg_br_prob_note, 
profile_probability::to_reg_br_prob_note): New functions.
$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
Undefined symbols:
  "make_pass_analyze_swaps(gcc::context*)", referenced from:
  gcc::pass_manager::pass_manager(gcc::context*) in libbackend.a(passes.o)
  gcc::pass_manager::pass_manager(gcc::context*) in libbackend.a(passes.o)
  "rs6000_output_load_multiple(rtx_def**)", referenced from:
  output_464(rtx_def**, rtx_insn*) in libbackend.a(insn-output.o)
  output_465(rtx_def**, rtx_insn*) in libbackend.a(insn-output.o)
  output_466(rtx_def**, rtx_insn*) in libbackend.a(insn-output.o)
  output_467(rtx_def**, rtx_insn*) in libbackend.a(insn-output.o)
  output_468(rtx_def**, rtx_insn*) in libbackend.a(insn-output.o)
  output_469(rtx_def**, rtx_insn*) in libbackend.a(insn-output.o)
  "expand_block_move(rtx_def**)", referenced from:
  gen_movmemsi(rtx_def*, rtx_def*, rtx_def*, rtx_def*) in
libbackend.a(insn-emit.o)
  "expand_block_clear(rtx_def**)", referenced from:
  gen_setmemsi(rtx_def*, rtx_def*, rtx_def*, rtx_def*) in
libbackend.a(insn-emit.o)
ld: symbol(s) not found
make[3]: *** [cc1plus] Error 1
$ cat stage_current
stage1
$ git stash
$ git bisect skip # 61cb18166c6a1507af78ce73a4e3c8a21b0cb8ab # r250239
Bisecting: 2001 revisions left to test after this (roughly 11 steps)
[4f5b1ee8ccfd04b939e07bd99f4ca6f8d3f5aa83]  PR go/80964 * configure.ac:
Set NATIVE if host_alias = target_alias.* configure: Rebuild.
$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
$ cat stage_current
stage3
$ git stash
$ git bisect good # 4f5b1ee8ccfd04b939e07bd99f4ca6f8d3f5aa83 # r249172
Bisecting: 1338 revisions left to test after this (roughly 10 steps)
[a5079b7fe2c7b4c862704149db5fb0948a7d02f8] Adds the powerpc equivalent
mm_malloc.h header which is needed by xmmintrin.h and cleans up some noisy
warnings from the previous MMX commit.
$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
$ cat stage_current
stage3
$ git stash
$ git bisect good # a5079b7fe2c7b4c862704149db5fb0948a7d02f8 # r251339
Bisecting: 668 revisions left to test after this (roughly 9 steps)
[237c1ea8f68a7cc3100b63ee50da05c9e0b0ea6d] rs6000: Don't touch below the stack
pointer (PR77687)
$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
build/gencfn-macros: DEF_INTERNAL_INT_FN (FFS) has no associated built-in
functions
build/gencfn-macros: DEF_INTERNAL_INT_FN (PARITY) has no associated built-in
functions
make[3]: *** [s-case-cfn-macros] Error 1
$ cat stage_current
stage2
$ git stash
$ git bisect bad # 237c1ea8f68a7cc3100b63ee50da05c9e0b0ea6d # r253033
Bisecting: 334 revisions left to test after this (roughly 8 steps)
[1f0c90bb95ae0d59c93a97dc12294425831c5080] 2017-09-07  Nicolas Roche 

$ patch -p1 < ../patches/iain.patch
$ ... configure and make ...
build/gencfn-macros: DEF_INTERNAL_INT_FN (CTZ) has no associated built-i

[Bug fortran/67760] ICE on contained subroutine in function modifying function return value

2018-10-24 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67760

--- Comment #4 from G. Steinmetz  ---

Works with an explicit result variable :


$ cat z2.f90
module m
   implicit none
contains
   function f() result(z)
  integer :: z(4)
  call s
   contains
  subroutine s
 z = 42
  end
   end
end
program p
   use m
   print *, f()
end


$ gfortran-9-20181021 z2.f90
$ a.out
  42  42  42  42

[Bug fortran/79685] [6/7/8/9 Regression] ICE on valid code in gfc_match_structur_constructor

2018-10-24 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79685

G. Steinmetz  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #5 from G. Steinmetz  ---

Update :


$ cat z1.f90
module m
   type t
   end type
end
module m2
   use m, t2 => t
   type(t2) :: x
   data x /t2()/
end


$ cat z2_chk.f90
module m
   type t
   end type
end
module m2
   use m, t2 => t
   type(t) :: x
   data x /t2()/
end


$ gfortran-9-20181021 -c z1.f90
f951: internal compiler error: in gfc_match_structure_constructor, at
fortran/primary.c:3066
0x67835d gfc_match_structure_constructor(gfc_symbol*, gfc_expr**)
../../gcc/fortran/primary.c:3065
0x6048ff match_data_constant
../../gcc/fortran/decl.c:427
0x6049b3 top_val_list
../../gcc/fortran/decl.c:472
0x604bcf gfc_match_data()
../../gcc/fortran/decl.c:616
0x669741 match_word
../../gcc/fortran/parse.c:65
0x66ce86 decode_statement
../../gcc/fortran/parse.c:468
0x66daaa next_free
../../gcc/fortran/parse.c:1234
0x66daaa next_statement
../../gcc/fortran/parse.c:1466
0x66f0bb parse_spec
../../gcc/fortran/parse.c:3858
0x672d1c parse_module
../../gcc/fortran/parse.c:5934
0x673067 gfc_parse_file()
../../gcc/fortran/parse.c:6247
0x6ba3ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204

[Bug fortran/87737] New: ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923

2018-10-24 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

Bug ID: 87737
   Summary: ICE tree check: expected ssa_name, have addr_expr in
remap_gimple_op_r, at tree-inline.c:923
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

Affects version 9 at -O[123], but not at -O[0gs].
Versions 5 to 8 are only affected at -O3 or -Ofast.


$ cat z1.f90
program p
   interface
  function f()
 character(:), allocatable :: f
  end
   end interface
   character(1) :: g
   print *, f()
   print *, g()
end

function f()
   character(:), allocatable :: f
   character(1) :: g
   f = 'f'
   return
entry g()
   g = 'g'
end


$ gfortran-9-20181021 -c z1.f90 -Os
$
$ gfortran-9-20181021 -c z1.f90 -O2
during GIMPLE pass: ccp
z1.f90:1:0:

1 | program p
  |
internal compiler error: Segmentation fault
0xb1c86f crash_signal
../../gcc/toplev.c:325
0x86c2d9 get_inner_reference(tree_node*, poly_int_pod<1u, long>*,
poly_int_pod<1u, long>*, tree_node**, machine_mode*, int*, int*, int*)
../../gcc/expr.c:7147
0x8a9c35 fold_comparison
../../gcc/fold-const.c:8524
0x89deb8 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
../../gcc/fold-const.c:10608
0xbee77c ccp_fold
../../gcc/tree-ssa-ccp.c:1246
0xbee77c evaluate_stmt
../../gcc/tree-ssa-ccp.c:1785
0xbf05de visit_cond_stmt
../../gcc/tree-ssa-ccp.c:2381
0xbf05de ccp_propagate::visit_stmt(gimple*, edge_def**, tree_node**)
../../gcc/tree-ssa-ccp.c:2439
0xc64fb3 ssa_propagation_engine::simulate_stmt(gimple*)
../../gcc/tree-ssa-propagate.c:230
0xc6522a ssa_propagation_engine::simulate_block(basic_block_def*)
../../gcc/tree-ssa-propagate.c:337
0xc66022 ssa_propagation_engine::ssa_propagate()
../../gcc/tree-ssa-propagate.c:800
0xbe8be7 do_ssa_ccp
../../gcc/tree-ssa-ccp.c:2471
0xbe8be7 execute
../../gcc/tree-ssa-ccp.c:2515

[Bug fortran/87737] ICE tree check: expected ssa_name, have addr_expr in remap_gimple_op_r, at tree-inline.c:923

2018-10-24 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87737

--- Comment #1 from G. Steinmetz  ---

Configured with --enable-checking=yes :


$ gfortran-9-20181021-chk -c z1.f90 -O2
during IPA pass: inline
f951:

internal compiler error: tree check: expected ssa_name, have addr_expr in
remap_gimple_op_r, at tree-inline.c:923
0x5e3e24 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9369
0xd0409e tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3118
0xd0409e remap_gimple_op_r
../../gcc/tree-inline.c:923
0xf5c593 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*, tree_node*
(*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*,
hash_set >*))
../../gcc/tree.c:11513
0x9c6b6c walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*),
walk_stmt_info*)
../../gcc/gimple-walk.c:268
0xcfd1b1 remap_gimple_stmt
../../gcc/tree-inline.c:1777
0xcfe4c4 copy_bb
../../gcc/tree-inline.c:1827
0xd0019c copy_cfg_body
../../gcc/tree-inline.c:2719
0xd0019c copy_body
../../gcc/tree-inline.c:2961
0xd05c82 expand_call_inline
../../gcc/tree-inline.c:4691
0xd08a64 gimple_expand_calls_inline
../../gcc/tree-inline.c:4886
0xd08a64 optimize_inline_calls(tree_node*)
../../gcc/tree-inline.c:5026
0x153c0eb inline_transform(cgraph_node*)
../../gcc/ipa-inline-transform.c:682
0xb92786 execute_one_ipa_transform_pass
../../gcc/passes.c:2170
0xb92786 execute_all_ipa_transforms()
../../gcc/passes.c:2212
0x8278af cgraph_node::expand()
../../gcc/cgraphunit.c:2187
0x828e20 expand_all_functions
../../gcc/cgraphunit.c:2332
0x828e20 symbol_table::compile()
../../gcc/cgraphunit.c:2683
0x82b9c6 symbol_table::compile()
../../gcc/cgraphunit.c:2864
0x82b9c6 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2861

[Bug c++/87736] New attributes to mark custom alloc/free function pair

2018-10-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87736

--- Comment #1 from joseph at codesourcery dot com  ---
Note that you can have a custom malloc function (e.g. xmalloc) that pairs 
with standard free, so it should be possible to indicate that.

[Bug middle-end/87736] New attributes to mark custom alloc/free function pair

2018-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87736

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 CC||msebor at gcc dot gnu.org
  Component|c++ |middle-end
 Depends on||87731
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #2 from Martin Sebor  ---
Something like this is probably necessary for a robust implementation of
pr87731.  It won't do much in GCC on its own, though it could be used by third
party static analyzers (that suggests that we might want to consider adopting
one or more existing forms of annotations already recognized by such tools).

This is also a general mechanism, not one specific to C++, so changing
Component to middle-end.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731
[Bug 87731] Detection of mismatched alloc/free pairs

[Bug middle-end/87731] Detection of mismatched alloc/free pairs

2018-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87731

Martin Sebor  changed:

   What|Removed |Added

  Component|c++ |middle-end
   Severity|normal  |enhancement

--- Comment #5 from Martin Sebor  ---
Like pr87736, this is also a general mechanism, not one specific to C++, so
changing Component to middle-end.

[Bug c++/87721] [9 Regression] ICE in linemap_position_for_line_and_column at gcc/libcpp/line-map.c:842 since r265271

2018-10-24 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87721

David Malcolm  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |dmalcolm at gcc dot 
gnu.org

--- Comment #1 from David Malcolm  ---
Confirmed; thanks.  I'm able to reproduce this and am working on reducing it.

[Bug fortran/87734] ICE in is_illegal_recursion check for character len= parameter

2018-10-24 Thread juergen.reuter at desy dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87734

Jürgen Reuter  changed:

   What|Removed |Added

 CC||juergen.reuter at desy dot de

--- Comment #1 from Jürgen Reuter  ---
Confirmed with current trunk. Could this be a duplicate of PR87644 ?

[Bug fortran/40196] [F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex parts (z%re, z%im)

2018-10-24 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40196

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #9 from Paul Thomas  ---
Created attachment 44892
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44892&action=edit
Patch for the PR

With the attached patch, the test below works fine.

The patch needs a bit more work to prevent LEN and KIND part_exprs being
assigned to, to assert the relevant standards and to prevent inquiries about
unallocated or unassociated deferred length expressions.

Paul

module m
  complex, target :: z
  character (:), allocatable :: str
  real, pointer :: r => z%re
  real, pointer :: i => z%im
  type :: mytype
complex :: z = ( 10.0, 11.0 )
character(6) :: str
  end type
end module

  use m

  type(mytype) :: der
  integer :: j

  z = (2.0,4.0)
  str = "abcd"

  if (r .ne. real (z)) stop 1
  if (i .ne. imag (z)) stop 2

  z%im = 4.0 * z%re

  if (z%re .ne. real (z)) stop 3
  if (abs (z*im - 4.0 * real (z)) .lt. 1e-6) stop 4
  if (z%im%kind .ne. kind (z)) stop 5

  if (str%kind .ne. kind (str)) stop 6
  if (str%len .ne. len (str)) stop 6

  if (der%str%len .ne. len (der%str)) stop 7
  if (der%z%im .ne. imag (der%z)) stop 8
end

[Bug fortran/40196] [F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex parts (z%re, z%im)

2018-10-24 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40196

--- Comment #10 from Paul Thomas  ---
Comment on attachment 44892
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44892
Patch for the PR

As for things to be done: I forgot the placeholder in simplify_const_ref and
the need for some modifications to simplify.c. A more elaborate testcase would
be in order as well!

Paul

[Bug c++/87721] [9 Regression] ICE in linemap_position_for_line_and_column at gcc/libcpp/line-map.c:842 since r265271

2018-10-24 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87721

--- Comment #2 from David Malcolm  ---
Reduced reproducer:

# define DBG_ERROR(dbg_logger, format, args...) if (1){\
  char dbg_buffer[256]; \
  __builtin_snprintf(dbg_buffer, sizeof(dbg_buffer)-1,\
  __FILE__":%5d: " format  , __LINE__ , ## args); \
};

void testPasswordStore1(int argc, char **argv) {
  const char *pw1="Secret1";
  char pw[256];
  DBG_ERROR(0, "Bad password, expected [%s], got [%s].", pw1, pw);
}


Am working on a fix.

[Bug fortran/87738] New: internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:4920

2018-10-24 Thread gill at ucar dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87738

Bug ID: 87738
   Summary: internal compiler error: in gfc_trans_use_stmts, at
fortran/trans-decl.c:4920
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gill at ucar dot edu
  Target Milestone: ---

[Bug testsuite/87739] New: new test case gcc.dg/tree-ssa/pr84436-5.c fails with its introduction in r265463

2018-10-24 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87739

Bug ID: 87739
   Summary: new test case gcc.dg/tree-ssa/pr84436-5.c fails with
its introduction in r265463
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

In r265463

make -k check-gcc RUNTESTFLAGS=tree-ssa.exp=gcc.dg/tree-ssa/pr84436-5.c
FAIL: gcc.dg/tree-ssa/pr84436-5.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/pr84436-5.c execution test
FAIL: gcc.dg/tree-ssa/pr84436-5.c scan-tree-dump-times switchconv "40 *\\*" 1

I only saw this on powerpc64 but both LE and BE.  It worked fine on x86.

Executing on host: /home/seurer/gcc/build/gcc-trunk/gcc/xgcc
-B/home/seurer/gcc/build/gcc-trunk/gcc/
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c   
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never   -O2 -fdump-tree-switchconv -fdump-tree-optimized 
-lm  -o ./pr84436-5.exe(timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-trunk/gcc/xgcc
-B/home/seurer/gcc/build/gcc-trunk/gcc/
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -O2 -fdump-tree-switchconv -fdump-tree-optimized -lm
-o ./pr84436-5.exe
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c: In
function 'foo':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:10:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:11:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:12:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:13:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:10:18:
warning: statement will never be executed [-Wswitch-unreachable]
FAIL: gcc.dg/tree-ssa/pr84436-5.c (test for excess errors)
Excess errors:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:10:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:11:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:12:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:13:5:
warning: case label value is less than minimum value for type
/home/seurer/gcc/gcc-trunk/gcc/testsuite/gcc.dg/tree-ssa/pr84436-5.c:10:18:
warning: statement will never be executed [-Wswitch-unreachable]

Setting LD_LIBRARY_PATH to
:/home/seurer/gcc/build/gcc-trunk/gcc:/home/seurer/gcc/build/gcc-trunk/powerpc64-unknown-linux-gnu/./libatomic/.libs::/home/seurer/gcc/build/gcc-trunk/gcc:/home/seurer/gcc/build/gcc-trunk/powerpc64-unknown-linux-gnu/./libatomic/.libs:/home/seurer/gcc/build/gcc-trunk/./gmp/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-gmp/.libs:/home/seurer/gcc/build/gcc-trunk/./mpfr/src/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-mpfr/src/.libs:/home/seurer/gcc/build/gcc-trunk/./mpc/src/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-mpc/src/.libs:/home/seurer/gcc/build/gcc-trunk/./isl/.libs:/home/seurer/gcc/build/gcc-trunk/./prev-isl/.libs:/home/seurer/gcc/install/gcc-7.2.0/lib64
Execution timeout is: 300
spawn [open ...]
FAIL: gcc.dg/tree-ssa/pr84436-5.c execution test
gcc.dg/tree-ssa/pr84436-5.c: pattern found 0 times
FAIL: gcc.dg/tree-ssa/pr84436-5.c scan-tree-dump-times switchconv "40 *\\*" 1
PASS: gcc.dg/tree-ssa/pr84436-5.c scan-tree-dump-not optimized "switch"

[Bug c++/84851] missing -Wclass-memaccess for a memcpy in a copy ctor with a non-trivial member

2018-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84851

--- Comment #3 from Martin Sebor  ---
Author: msebor
Date: Wed Oct 24 18:06:14 2018
New Revision: 265467

URL: https://gcc.gnu.org/viewcvs?rev=265467&root=gcc&view=rev
Log:
PR c++/84851 - missing -Wclass-memaccess for a memcpy in a copy ctor with a
non-trivial member

gcc/cp/ChangeLog:

PR c++/84851
* call.c (maybe_warn_class_memaccess): Tighten up.

gcc/testsuite/ChangeLog:

PR c++/84851
* g++.dg/Wclass-memaccess-4.C: Remove XFAIL.


Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/Wclass-memaccess-4.C

[Bug c++/84851] missing -Wclass-memaccess for a memcpy in a copy ctor with a non-trivial member

2018-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84851

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||9.0
 Resolution|--- |FIXED
   Target Milestone|--- |9.0
  Known to fail||8.2.0

--- Comment #4 from Martin Sebor  ---
Done in r265467.

[Bug c++/84850] [8 Regression] -Wclass-memaccess on a memcpy in a copy assignment operator with no nontrivial bases or members

2018-10-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84850
Bug 84850 depends on bug 84851, which changed state.

Bug 84851 Summary: missing -Wclass-memaccess for a memcpy in a copy ctor with a 
non-trivial member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84851

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug fortran/87725] OpenMP 4.5 clause schedule(simd,monotonic:static) not understood

2018-10-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87725

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-10-24
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Created attachment 44893
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44893&action=edit
gcc9-pr87725.patch

Well, OpenMP 4.5 Fortran support is unfinished, this is just one of the things.
Though, the reason here was just a thinko (nmodifiers == 0 test when nmodifiers
== 1 should have been used, because unlike C/C++ FEs it has been bumped already
at that point if there was any), the rest of the patch is just better
diagnostics and accepting even the bogus cases that I'll make sure to make
invalid in OpenMP 5.1.

[Bug testsuite/87740] New: Error Making Test Suite

2018-10-24 Thread christopher.e.ozawa at raytheon dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87740

Bug ID: 87740
   Summary: Error Making Test Suite
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: christopher.e.ozawa at raytheon dot com
  Target Milestone: ---

Attempt to build test suite using the "make" command resulted in errors.

GCC version/configuration output: COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --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 --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 

Command: make

Error Message: ../.././isl/isl_tab_pip.c: In function
‘isl_tab_basic_set_non_trivial_lexmin’:
../.././isl/isl_tab_pip.c:5087:21: internal compiler error: in check, at
tree-vrp.c:155
 5087 | __isl_give isl_vec *isl_tab_basic_set_non_trivial_lexmin(
  | ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Makefile:1463: recipe for target 'isl_tab_pip.lo' failed
make[5]: *** [isl_tab_pip.lo] Error 1
make[5]: Leaving directory
'/home/devvm/Downloads/gcc-master/host-x86_64-pc-linux-gnu/isl'
Makefile:1571: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
'/home/devvm/Downloads/gcc-master/host-x86_64-pc-linux-gnu/isl'
Makefile:1167: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory
'/home/devvm/Downloads/gcc-master/host-x86_64-pc-linux-gnu/isl'
Makefile:8812: recipe for target 'all-stage3-isl' failed
make[2]: *** [all-stage3-isl] Error 2
make[2]: Leaving directory '/home/devvm/Downloads/gcc-master'
Makefile:27710: recipe for target 'stage3-bubble' failed
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory '/home/devvm/Downloads/gcc-master'
Makefile:959: recipe for target 'all' failed
make: *** [all] Error 2

[Bug fortran/87738] internal compiler error: in gfc_trans_use_stmts, at fortran/trans-decl.c:4920

2018-10-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87738

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-10-24
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Missing reproducer!-(

[Bug testsuite/87740] Error Making Test Suite

2018-10-24 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87740

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
GCC 5.4 is not supported anymore.

[Bug fortran/87734] ICE in is_illegal_recursion check for character len= parameter

2018-10-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87734

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
The ICE appeared between revisions r258235 (2018-03-04, OK) and r258362
(2018-03-08, ICE), likely r258347 (pr64124 and pr70409). For me the test
compiles with 6.4.0 and 7.3.0, but not for 6.4.1 or 7.3.1.

> Confirmed with current trunk. Could this be a duplicate of PR87644 ?

Rather a duplicate of pr87673.

[Bug c++/87721] [9 Regression] ICE in linemap_position_for_line_and_column at gcc/libcpp/line-map.c:842 since r265271

2018-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87721

--- Comment #3 from Martin Liška  ---
That's good you can reproduce that ;)

[Bug c++/86288] Recognize __gnu and/or __gnu__ as attribute-namespace

2018-10-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86288

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Wed Oct 24 19:39:23 2018
New Revision: 265470

URL: https://gcc.gnu.org/viewcvs?rev=265470&root=gcc&view=rev
Log:
PR c++/86288
* parser.c (cp_parser_std_attribute): Canonicalize attr_ns, and when
:: is not present and attr_ns non-NULL, canonicalize also attr_id.
(cp_parser_attribute_spec): Fix comment typo.

* g++.dg/cpp0x/gen-attrs-66.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/gen-attrs-66.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog

[Bug bootstrap/87741] New: Don't build readline/libreadline.a in GDB, when --with-system-readline is supplied

2018-10-24 Thread dilyan.palauzov at aegee dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87741

Bug ID: 87741
   Summary: Don't build readline/libreadline.a in GDB, when
--with-system-readline is supplied
   Product: gcc
   Version: 7.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dilyan.palauzov at aegee dot org
  Target Milestone: ---

Please integrate this snippet, so that gdb can skip building the shipped
libreadline, when the system-libreadline is used, see
https://sourceware.org/bugzilla/show_bug.cgi?id=18632 for details


diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -253,6 +253,12 @@ if test x$with_system_zlib = xyes ; then
   noconfigdirs="$noconfigdirs zlib"
 fi

+# Don't compile the bundled readline/libreadline.a in gdb-binutils if
+#  --with-system-readline is provided.
+if test x$with_system_readline = xyes ; then
+  noconfigdirs="$noconfigdirs readline"
+fi
+
 # some tools are so dependent upon X11 that if we're not building with X, 
 # it's not even worth trying to configure, much less build, that tool.

[Bug bootstrap/87741] Don't build readline/libreadline.a in GDB, when --with-system-readline is supplied

2018-10-24 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87741

--- Comment #1 from Andrew Pinski  ---
Patches should be sent to gcc-patches@ after reading
https://gcc.gnu.org/contribute.html .

[Bug target/87631] new attribute for passing structures with multiple SIMD data members in registers

2018-10-24 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87631

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ABI, missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-10-24
  Component|c++ |target
 Ever confirmed|0   |1

[Bug fortran/87689] Memory corruption on Power 8

2018-10-24 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87689

--- Comment #6 from Thomas Koenig  ---
(In reply to Segher Boessenkool from comment #5)
> No, doesn't ring bells.  But I have some more input:
> 
> I couldn't get it to fail on powerpc64-linux.
> It fails on powerpc64le-linux only if the second file is compiled with -O0.

Not for me:

tkoenig@gcc2-power8 ~]$ ~/bin/gfortran -static-libgfortran main.f
doesntwork_p8.f 
[tkoenig@gcc2-power8 ~]$ ./a.out
   1   2   3   4   5   0
 �
 foo 
[tkoenig@gcc2-power8 ~]$ valgrind ./a.out
==145922== Memcheck, a memory error detector
==145922== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==145922== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==145922== Command: ./a.out
==145922== 
==145922== Conditional jump or move depends on uninitialised value(s)
==145922==at 0x10013EF8: write_decimal.constprop.10 (write.c:808)
==145922==by 0x100143F7: write_integer (write.c:1351)
==145922==by 0x1001584F: list_formatted_write_scalar (write.c:1865)
==145922==by 0x1001664B: _gfortrani_list_formatted_write (write.c:1943)
==145922==by 0x10005A47: transfer_integer (transfer.c:2294)
==145922==by 0x10005A47: _gfortran_transfer_integer_write (transfer.c:2300)
==145922==by 0x10002563: doesntwork_p8_ (in /home/tkoenig/a.out)
==145922==by 0x10002443: MAIN__ (in /home/tkoenig/a.out)
==145922==by 0x100021E3: main (in /home/tkoenig/a.out)
==145922== 
==145922== Conditional jump or move depends on uninitialised value(s)
==145922==at 0x100100BC: extract_int (write.c:556)
==145922==by 0x10013F0B: write_decimal.constprop.10 (write.c:810)
==145922==by 0x1001584F: list_formatted_write_scalar (write.c:1865)
==145922==by 0x1001664B: _gfortrani_list_formatted_write (write.c:1943)
==145922==by 0x10005A47: transfer_integer (transfer.c:2294)
==145922==by 0x10005A47: _gfortran_transfer_integer_write (transfer.c:2300)
==145922==by 0x100025C7: doesntwork_p8_ (in /home/tkoenig/a.out)
==145922==by 0x10002443: MAIN__ (in /home/tkoenig/a.out)
==145922==by 0x100021E3: main (in /home/tkoenig/a.out)
==145922== 
   1   2   3   4   5   0
 o
 foo 

Also, you have to add the six arguments; it works with five.

Next data point: On a POWER9, it also fails.

There is one other thing: With gcc9 on x86_64, one gets

gfortran -flto main.f doesnwork_p8.f
main.f:7: warning: type of 'doesntwork_p8' does not match original declaration
[-Wlto-type-mismatch]
7 | res = doesntwork_p8(c,1,2,3,4,5,6)
  | 
doesnwork_p8.f:1: note: type mismatch in parameter 3
1 |   function doesntwork_p8(c,a1,a2,a3,a4,a5,a6)
  | 
doesnwork_p8.f:1: note: 'doesntwork_p8' was previously declared here

So, probably something wrong with our decls.

  1   2   >