[Bug rtl-optimization/86882] [9 Regression] ICE in reg_overlap_mentioned_p, at rtlanal.c:1873

2018-08-08 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882

Uroš Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-08
 CC||segher at gcc dot gnu.org
   Target Milestone|--- |9.0
 Ever confirmed|0   |1

--- Comment #1 from Uroš Bizjak  ---
Confirmed, combine creates invalid RTX:

Trying 11, 13 -> 14:
   11: {r95:HI=r92:QI#0&0xff00;clobber flags:CC;}
  REG_UNUSED flags:CC
  REG_DEAD r92:QI
   13: {r97:HI=r95:HI^0x101;clobber flags:CC;}
  REG_UNUSED flags:CC
  REG_DEAD r95:HI
   14: r92:QI=r97:HI#0
Failed to match this instruction:
(parallel [
(set (clobber:QI (const_int 0 [0]))
(const_int 1 [0x1]))
(set (reg:HI 97)
(xor:HI (and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00]))
(const_int 257 [0x101])))
])
Failed to match this instruction:
(parallel [
(set (clobber:QI (const_int 0 [0]))
(const_int 1 [0x1]))
(set (reg:HI 97)
(xor:HI (and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00]))
(const_int 257 [0x101])))
])

This part:

(set (clobber:QI (const_int 0 [0]))
(const_int 1 [0x1]))

is invalid and triggers assert in reg_overlap_mentioned_p.

[Bug rtl-optimization/86882] [9 Regression] ICE in reg_overlap_mentioned_p, at rtlanal.c:1873

2018-08-08 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882

--- Comment #2 from Uroš Bizjak  ---
Also suspicious combine transformation before the failure:

Trying 10, 11 -> 13:
   10: r94:SI=zero_extend(r92:QI)
   11: {r95:SI=r94:SI^0x101;clobber flags:CC;}
  REG_DEAD r94:SI
  REG_UNUSED flags:CC
   13: {r97:HI=r95:SI#0^r92:QI#0;clobber flags:CC;}
  REG_DEAD r95:SI
  REG_DEAD r92:QI
  REG_UNUSED flags:CC
Failed to match this instruction:
(parallel [
(set (reg:HI 97)
(xor:HI (and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00]))
(const_int 257 [0x101])))
(clobber (reg:CC 17 flags))
])
Failed to match this instruction:
(set (reg:HI 97)
(xor:HI (and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00]))
(const_int 257 [0x101])))
Successfully matched this instruction:
(set (reg:HI 95 [ jd ])
(and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00])))
Successfully matched this instruction:
(set (reg:HI 97)
(xor:HI (reg:HI 95 [ jd ])
(const_int 257 [0x101])))
allowing combination of insns 10, 11 and 13
original costs 4 + 4 + 4 = 12
replacement costs 6 + 4 = 10
deferring deletion of insn with uid = 10.
modifying insn i211: {r95:HI=r92:QI#0&0xff00;clobber flags:CC;}
  REG_UNUSED flags:CC
  REG_DEAD r92:QI
deferring rescan insn with uid = 11.
modifying insn i313: {r97:HI=r95:HI^0x101;clobber flags:CC;}
  REG_UNUSED flags:CC
  REG_DEAD r95:HI
deferring rescan insn with uid = 13.

The problematic insn:

(set (reg:HI 95 [ jd ])
(and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00])))

clears defined bits from the subreg and keeps undefined bits from the
paradoxical subreg.

[Bug tree-optimization/86886] New: Gcc miscompiles at -O3 on valid code

2018-08-08 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86886

Bug ID: 86886
   Summary: Gcc miscompiles at -O3 on valid code
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: helloqirun at gmail dot com
  Target Milestone: ---

It also affects gcc-8.1 at -O3. gcc-6.1 works fine.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 9.0.0 20180807 (experimental) [trunk revision 263356] (GCC)



$ gcc-6.1 -O3 abc.c; ./a.out
0

$ gcc abc.c; ./a.out
0

$ gcc-8.1 -O3 abc.c; ./a.out
1

$ gcc-trunk -O3 abc.c; ./a.out
1


$ cat abc.c
void printf();
typedef int f;
short g, k, l, n;
union {
  int b;
  short c;
} h;
f d, e;
unsigned short *i = &h.c;
unsigned short **j = &i;
f *m = &d, *o = &h.b;
void p(f a) {
  *o = 0;
  for (; e;)
;
  n = **j;
  l = n;
  unsigned char aq = n;
  k = g == 0 ? aq : 0;
  *m = k;
}
int main() {
  **j = 1;
  p(6);
  printf("%d\n", d);
}

[Bug tree-optimization/86886] Gcc miscompiles at -O3 on valid code

2018-08-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86886

--- Comment #1 from Andrew Pinski  ---
I don't think this is a bug.  You are taking the address of a field of an union
and accessing via that address.  This is not tracked at all.

[Bug target/85904] [7/8 Regression] configure issue cross compiling on netbsd, with patch

2018-08-08 Thread sebastian.hu...@embedded-brains.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85904

Sebastian Huber  changed:

   What|Removed |Added

 CC||sebastian.huber@embedded-br
   ||ains.de

--- Comment #8 from Sebastian Huber  ---
This bug affects also all Newlib targets.  However, the configure checks in
GLIBCXX_CROSSCONFIG do not work here, due to this Newlib speciality in
libstdc++-v3/configure.ac:

  # First, test for "known" system libraries.  We may be using newlib even
  # on a hosted environment.
  if test "x${with_newlib}" = "xyes"; then

[Bug debug/86593] [8/9 Regression] internal compiler error: in based_loc_descr, at dwarf2out.c:14272

2018-08-08 Thread manisandro at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86593

--- Comment #6 from Sandro Mani  ---
Looking good for my use-cases, thanks!

[Bug c++/86738] [8/9 Regression] gcc 8.2: Internal compiler error memcpy

2018-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86738

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Wed Aug  8 08:31:40 2018
New Revision: 263390

URL: https://gcc.gnu.org/viewcvs?rev=263390&root=gcc&view=rev
Log:
PR c++/86738
* constexpr.c (cxx_eval_binary_expression): For arithmetics involving
NULL pointer set *non_constant_p to true.
(cxx_eval_component_reference): For dereferencing of a NULL pointer,
set *non_constant_p to true and return t.

* g++.dg/opt/pr86738.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/opt/pr86738.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/86836] internal compiler error on structured bindings with shadow parameter on templated function

2018-08-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86836

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Wed Aug  8 08:32:51 2018
New Revision: 263391

URL: https://gcc.gnu.org/viewcvs?rev=263391&root=gcc&view=rev
Log:
PR c++/86836
* pt.c (tsubst_expr): For structured bindings, call tsubst_decomp_names
before tsubst_init, not after it.

* g++.dg/cpp1z/decomp46.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/decomp46.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c/86885] gcc erroneously allows constructor/destructor attributes on nested functions

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86885

Jonathan Wakely  changed:

   What|Removed |Added

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

[Bug tree-optimization/86886] Gcc miscompiles at -O3 on valid code

2018-08-08 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86886

--- Comment #2 from Qirun Zhang  ---
(In reply to Andrew Pinski from comment #1)
> I don't think this is a bug.  You are taking the address of a field of an
> union and accessing via that address.  This is not tracked at all.

Here is a reduced case without "union".

$ gcc-6.1 -O3 abc.c; ./a.out
0

$ gcc abc.c; ./a.out
0

$ gcc-8.1 -O3 abc.c; ./a.out
1

$ gcc-trunk -O3 abc.c; ./a.out
1

$ cat abc.c
void printf();
short b, c;
int e, d;
int *f = &e, *g = &d;
unsigned short **h = (unsigned short **)&f;
void i(int a) {
  *f = 0;
  for (; b;)
;
  c = **h;
  d = b = e ? (unsigned char)c : 0;
  *g = b;
}
int main() {
  **h = 1;
  i(6);
  printf("%d\n", c);
}

[Bug tree-optimization/86886] Gcc miscompiles at -O3 on valid code

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86886

--- Comment #3 from Jonathan Wakely  ---
Your second example has undefined behaviour, as you blatantly violate the
strict aliasing rules, and -Wstrict-aliasing=2 will warn you about it:

86886.c:5:1: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
 unsigned short **h = (unsigned short **)&f;
 ^~~~


The union example has the same problem, just less blatantly.

[Bug tree-optimization/86886] Gcc miscompiles at -O3 on valid code

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86886

--- Comment #4 from Jonathan Wakely  ---
If you want to play these sort of games then you need to compile with
-fno-strict-aliasing (which you should have tried anyway if you'd read
https://gcc.gnu.org/bugs/ first)

[Bug target/86887] New: [9 Regression] aarch64: adcs accepts only register arguments

2018-08-08 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86887

Bug ID: 86887
   Summary: [9 Regression] aarch64: adcs accepts only register
arguments
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: assemble-failure
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: aarch64-unknown-linux-gnu

Created attachment 44518
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44518&action=edit
reduced testcase

Compiler output:
$ aarch64-unknown-linux-gnu-gcc -O testcase.c
/tmp/cc93Bw20.s: Assembler messages:
/tmp/cc93Bw20.s:39: Error: operand 1 must be an integer register -- `adcs
[sp,104],x3,x0'

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-263387-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/9.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-263387-checking-yes-rtl-df-extra-aarch64
Thread model: posix
gcc version 9.0.0 20180808 (experimental) (GCC) 

The assembler is right, adcs needs all 3 arguments to be regsiters:
https://static.docs.arm.com/ddi0487/ca/DDI0487C_a_armv8_arm.pdf

[Bug fortran/86888] New: [F08] allocatable components of indirectly recursive type

2018-08-08 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86888

Bug ID: 86888
   Summary: [F08] allocatable components of indirectly recursive
type
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: janus at gcc dot gnu.org
  Target Milestone: ---

Test case:


type :: s
   type(t), allocatable :: x
end type

type :: t
   type(s), allocatable :: y
end type

end


gfortran trunk rejects this with:

type(t), allocatable :: x
  1
Error: Derived type at (1) has not been previously defined and so cannot appear
in a derived type definition


IIUC this is valid in F08:

C440 (R436) If neither the POINTER nor the ALLOCATABLE attribute is specified,
the declaration-type-spec in the component-def-stmt shall specify an intrinsic
type or a previously defined derived type.

ifort 18 accepts it happily.

[Bug fortran/86888] [F08] allocatable components of indirectly recursive type

2018-08-08 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86888

--- Comment #1 from janus at gcc dot gnu.org ---
Draft patch:

Index: gcc/fortran/decl.c
===
--- gcc/fortran/decl.c  (revision 263395)
+++ gcc/fortran/decl.c  (working copy)
@@ -5864,8 +5864,7 @@ gfc_match_data_decl (void)
   if (current_attr.pointer && gfc_comp_struct (gfc_current_state ()))
goto ok;

-  if (current_attr.allocatable && gfc_current_state () == COMP_DERIVED
- && current_ts.u.derived == gfc_current_block ())
+  if (current_attr.allocatable && gfc_current_state () == COMP_DERIVED)
goto ok;

   gfc_find_symbol (current_ts.u.derived->name,



Shows only one regression in the testsuite:

FAIL: gfortran.dg/alloc_comp_basics_6.f90   -O   (test for errors, line 8)

[Bug target/85295] ICE in extract_constrain_insn, at recog.c:2205

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85295

--- Comment #3 from Andreas Krebbel  ---
Author: krebbel
Date: Wed Aug  8 12:38:51 2018
New Revision: 263396

URL: https://gcc.gnu.org/viewcvs?rev=263396&root=gcc&view=rev
Log:
S/390: Fix PR85295

gcc/ChangeLog:

2018-08-08  Andreas Krebbel  

PR target/85295
* config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
definitions.
* config/s390/s390.md ("movti"): Add more alternatives for
constant to GPR copies.

gcc/testsuite/ChangeLog:

2018-08-08  Andreas Krebbel  

PR target/85295
* gcc.target/s390/TI-constants-lra.c: New testcase.
* gcc.target/s390/TI-constants-nolra.c: New testcase.


Added:
trunk/gcc/testsuite/gcc.target/s390/TI-constants-lra.c
trunk/gcc/testsuite/gcc.target/s390/TI-constants-nolra.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/s390/constraints.md
trunk/gcc/config/s390/s390.md
trunk/gcc/testsuite/ChangeLog

[Bug target/86887] [9 Regression] aarch64: adcs accepts only register arguments

2018-08-08 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86887

Richard Earnshaw  changed:

   What|Removed |Added

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

--- Comment #1 from Richard Earnshaw  ---
confirmed

[Bug libstdc++/86597] directory_entry::exist et al forget to clear the error_code.

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86597

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |8.3

[Bug libstdc++/86597] directory_entry::exist et al forget to clear the error_code.

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86597

--- Comment #1 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 13:09:19 2018
New Revision: 263397

URL: https://gcc.gnu.org/viewcvs?rev=263397&root=gcc&view=rev
Log:
PR libstdc++/86597 directory_entry observers should clear error_code

PR libstdc++/86597
* include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
Clear error_code when cached type is used.
* testsuite/27_io/filesystem/directory_entry/86597.cc: New test.

Added:
trunk/libstdc++-v3/testsuite/27_io/filesystem/directory_entry/
trunk/libstdc++-v3/testsuite/27_io/filesystem/directory_entry/86597.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/fs_dir.h

[Bug target/86887] [9 Regression] aarch64: adcs accepts only register arguments

2018-08-08 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86887

Richard Earnshaw  changed:

   What|Removed |Added

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

[Bug tree-optimization/86889] New: s390x gcc build fails when configured with --disable-checking

2018-08-08 Thread iii at linux dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86889

Bug ID: 86889
   Summary: s390x gcc build fails when configured with
--disable-checking
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: iii at linux dot ibm.com
  Target Milestone: ---
  Host: s390x-linux-gnu
Target: s390x-linux-gnu
 Build: s390x-linux-gnu

Seen on master (18d371d3):

build$ ../configure --disable-checking
build$ make -j$(getconf _NPROCESSORS_ONLN)

../../gcc/bitmap.c: In function ‘unsigned int
bitmap_last_set_bit(const_bitmap)’:
../../gcc/bitmap.c:841:26: error: array subscript -1 is below array bounds of
‘const BITMAP_WORD [2]’ {aka ‘const long unsigned int [2]’}
[-Werror=array-bounds]
   word = elt->bits[ix];

The code in question is:

 839   for (ix = BITMAP_ELEMENT_WORDS - 1; ix >= 0; ix--)
 840 {
 841   word = elt->bits[ix];
 842   if (word)
 843 goto found_bit;
 844 }

BITMAP_ELEMENT_WORDS on s390x is 2.
I narrowed this down to cunrolli pass, which unrolls this loop 3 times instead
of 2, so ix=[1, 0, -1] instead of just [1, 0].
And indeed, building this individual file with -fdisable-tree-cunrolli helps.

[Bug target/81084] [8 Regression] powerpcspe port full of confusing configury / command-line options not related to SPE

2018-08-08 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81084

--- Comment #63 from John Paul Adrian Glaubitz  ---
Just wanted to ask whether there is an updated patch available for testing?

[Bug rtl-optimization/86882] [9 Regression] ICE in reg_overlap_mentioned_p, at rtlanal.c:1873

2018-08-08 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882

--- Comment #3 from Segher Boessenkool  ---
combine creates a clobber of const_int 0 to make sure a pattern will
not match.  That is valid RTL, but further patterns constructed from
that are not (clobber on a rhs).

The upper bits of a paradoxical subregs are defined in many cases,
see SUBREG_PROMOTED_VAR_P; does that apply here?

[Bug target/86448] GCC 9 compiler generates slower code for spec 2006 milc on a power9 using -mcpu=power9 than using -mcpu=power8

2018-08-08 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86448

--- Comment #5 from kelvin at gcc dot gnu.org ---
I apologize for an error in the previous comment.  The two columns should have
been labeled -mcpu=power8 (left) and -mcpu=power9 (right) instead of gcc8 and
gcc9.

[Bug other/86890] New: GCC 8.2.0 fails to build with isl 0.20

2018-08-08 Thread freddie_chopin at op dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86890

Bug ID: 86890
   Summary: GCC 8.2.0 fails to build with isl 0.20
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: freddie_chopin at op dot pl
  Target Milestone: ---

When trying to build GCC 8.2.0 with isl 0.20, I see a lot (at least a few
dozens) of errors about undeclared functions, like:

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  
-DHAVE_CONFIG_H -I. -I.
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/.
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../include
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libcpp/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/gmp-6.1.2/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/mpfr-4.0.1/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/mpc-1.1.0/include
 -I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libdecnumber
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libbacktrace
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/isl-0.20/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/zlib-1.2.11/include
-pipe  -o graphite-isl-ast-to-gimple.o -MT graphite-isl-ast-to-gimple.o -MMD
-MP -MF ./.deps/graphite-isl-ast-to-gimple.TPo
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:
In function ‘void ivs_params_clear(ivs_params&)’:
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:83:7:
error: ‘isl_id_free’ was not declared in this scope
   isl_id_free (it->first);
   ^~~
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:83:7:
note: suggested alternative: ‘isl_aff_free’
   isl_id_free (it->first);
   ^~~
   isl_aff_free

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

This seems like some header include problems or something like that, as there
definitely is a isl_id_free() function in
/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/isl-0.20/include/isl/id.h,
which is available in the search path.

[Bug rtl-optimization/83420] S/390 bootstrap failure starting with r255569

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83420

Andreas Krebbel  changed:

   What|Removed |Added

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

--- Comment #3 from Andreas Krebbel  ---
Fixed

Re: [Bug other/86890] New: GCC 8.2.0 fails to build with isl 0.20

2018-08-08 Thread graham stott
isl  0.18 is the supported version for gcc 8 branch.

 Original message 
From: freddie_chopin at op dot pl  
Date: 08/08/2018  16:04  (GMT+00:00) 
To: gcc-bugs@gcc.gnu.org 
Subject: [Bug other/86890] New: GCC 8.2.0 fails to build with isl 0.20 

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86890

    Bug ID: 86890
   Summary: GCC 8.2.0 fails to build with isl 0.20
   Product: gcc
   Version: 8.2.0
    Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: freddie_chopin at op dot pl
  Target Milestone: ---

When trying to build GCC 8.2.0 with isl 0.20, I see a lot (at least a few
dozens) of errors about undeclared functions, like:

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  
-DHAVE_CONFIG_H -I. -I.
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/.
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../include
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libcpp/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/gmp-6.1.2/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/mpfr-4.0.1/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/mpc-1.1.0/include
 -I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libdecnumber
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libbacktrace
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/isl-0.20/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/zlib-1.2.11/include
-pipe  -o graphite-isl-ast-to-gimple.o -MT graphite-isl-ast-to-gimple.o -MMD
-MP -MF ./.deps/graphite-isl-ast-to-gimple.TPo
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:
In function ‘void ivs_params_clear(ivs_params&)’:
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:83:7:
error: ‘isl_id_free’ was not declared in this scope
   isl_id_free (it->first);
   ^~~
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:83:7:
note: suggested alternative: ‘isl_aff_free’
   isl_id_free (it->first);
   ^~~
   isl_aff_free

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

This seems like some header include problems or something like that, as there
definitely is a isl_id_free() function in
/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/isl-0.20/include/isl/id.h,
which is available in the search path.

[Bug rtl-optimization/83420] S/390 bootstrap failure starting with r255569

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83420

Andreas Krebbel  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #4 from Andreas Krebbel  ---
Closing

[Bug other/86890] GCC 8.2.0 fails to build with isl 0.20

2018-08-08 Thread graham.stott77 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86890

--- Comment #1 from graham.stott77 at gmail dot com ---
isl  0.18 is the supported version for gcc 8 branch.

 Original message 
From: freddie_chopin at op dot pl  
Date: 08/08/2018  16:04  (GMT+00:00) 
To: gcc-bugs@gcc.gnu.org 
Subject: [Bug other/86890] New: GCC 8.2.0 fails to build with isl 0.20 

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86890

    Bug ID: 86890
   Summary: GCC 8.2.0 fails to build with isl 0.20
   Product: gcc
   Version: 8.2.0
    Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: freddie_chopin at op dot pl
  Target Milestone: ---

When trying to build GCC 8.2.0 with isl 0.20, I see a lot (at least a few
dozens) of errors about undeclared functions, like:

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  
-DHAVE_CONFIG_H -I. -I.
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/.
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../include
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libcpp/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/gmp-6.1.2/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/mpfr-4.0.1/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/mpc-1.1.0/include
 -I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libdecnumber
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/../libbacktrace
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/isl-0.20/include
-I/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/zlib-1.2.11/include
-pipe  -o graphite-isl-ast-to-gimple.o -MT graphite-isl-ast-to-gimple.o -MMD
-MP -MF ./.deps/graphite-isl-ast-to-gimple.TPo
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:
In function ‘void ivs_params_clear(ivs_params&)’:
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:83:7:
error: ‘isl_id_free’ was not declared in this scope
   isl_id_free (it->first);
   ^~~
/home/freddie/bleeding-edge-toolchain/sources/gcc-8.2.0/gcc/graphite-isl-ast-to-gimple.c:83:7:
note: suggested alternative: ‘isl_aff_free’
   isl_id_free (it->first);
   ^~~
   isl_aff_free

-- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 -- >8 --

This seems like some header include problems or something like that, as there
definitely is a isl_id_free() function in
/home/freddie/bleeding-edge-toolchain/buildNative/prerequisites/isl-0.20/include/isl/id.h,
which is available in the search path.

[Bug c++/86082] user-defined literals are not converted to the execution charset

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86082

Andreas Krebbel  changed:

   What|Removed |Added

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

--- Comment #8 from Andreas Krebbel  ---
Fixed for GCC 9. No backport planned for GCC 8.

[Bug c++/86082] user-defined literals are not converted to the execution charset

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86082

Andreas Krebbel  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #9 from Andreas Krebbel  ---
Closing

[Bug target/85295] ICE in extract_constrain_insn, at recog.c:2205

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85295

Andreas Krebbel  changed:

   What|Removed |Added

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

--- Comment #4 from Andreas Krebbel  ---
Fixed with the patch from comment 3

[Bug other/86890] GCC 8.2.0 fails to build with isl 0.20

2018-08-08 Thread freddie_chopin at op dot pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86890

--- Comment #2 from Freddie Chopin  ---
Prerequisites docs say "isl Library version 0.15 or later". Configure script
also accepts 0.20 just fine.

BTW - 0.19 builds and works OK.

[Bug target/79895] ICE in extract_constrain_insn, at recog.c:2213

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79895

Andreas Krebbel  changed:

   What|Removed |Added

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

--- Comment #4 from Andreas Krebbel  ---
Fixed

[Bug target/84332] ICE in insn_default_length, at config/s390/s390.md:9697 for -fstack-clash-protection

2018-08-08 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84332

Andreas Krebbel  changed:

   What|Removed |Added

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

[Bug c++/86767] [6/7/8 Regression] continue statements in constexpr functions causes unbounded looping

2018-08-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86767

--- Comment #6 from Marek Polacek  ---
Author: mpolacek
Date: Wed Aug  8 15:30:50 2018
New Revision: 263410

URL: https://gcc.gnu.org/viewcvs?rev=263410&root=gcc&view=rev
Log:
PR c++/86767
* constexpr.c (cxx_eval_statement_list): Handle continue.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1y/constexpr-86767.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/constexpr.c

[Bug c++/86767] [6/7 Regression] continue statements in constexpr functions causes unbounded looping

2018-08-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86767

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
Summary|[6/7/8 Regression] continue |[6/7 Regression] continue
   |statements in constexpr |statements in constexpr
   |functions causes unbounded  |functions causes unbounded
   |looping |looping

--- Comment #7 from Marek Polacek  ---
Fixed.

[Bug libstdc++/86597] directory_entry::exist et al forget to clear the error_code.

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86597

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:33:32 2018
New Revision: 263412

URL: https://gcc.gnu.org/viewcvs?rev=263412&root=gcc&view=rev
Log:
PR libstdc++/86597 directory_entry observers should clear error_code

PR libstdc++/86597
* include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
Clear error_code when cached type is used.
* testsuite/27_io/filesystem/directory_entry/86597.cc: New test.

Added:
   
branches/gcc-8-branch/libstdc++-v3/testsuite/27_io/filesystem/directory_entry/
   
branches/gcc-8-branch/libstdc++-v3/testsuite/27_io/filesystem/directory_entry/86597.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/fs_dir.h

[Bug libstdc++/85222] [7 Regression] ABI breakage of __throw_ios_failure by r244498

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85222

--- Comment #24 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:11 2018
New Revision: 263414

URL: https://gcc.gnu.org/viewcvs?rev=263414&root=gcc&view=rev
Log:
PR libstdc++/66145 allow catching iostream errors as cxx11 ios::failure

Define a new exception type derived from the gcc4-compatible ios::failure
which also aggregates an object of the ios::failure[abi:cxx11] type.
Make __throw_ios_failure throw this new type for iostream errors
that raise exceptions. Provide custom type info for the new type so that
it can be caught by handlers for ios::failure[abi:cxx11] type
as well as handlers for the gcc4-compatible ios::failure and its bases.

Backport from mainline
2018-04-10  Jonathan Wakely  

PR libstdc++/85222
* src/c++11/cxx11-ios_failure.cc (__construct_ios_failure)
(__destroy_ios_failure, is_ios_failure_handler): New functions.
* src/c++11/ios.cc (__throw_ios_failure): Remove definition.
(_GLIBCXX_USE_CXX11_ABI): Don't define here.
* src/c++98/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
ios_failure.cc to rewrite type info for __ios_failure.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/ios_failure.cc [_GLIBCXX_USE_DUAL_ABI]
(__iosfailure, __iosfailure_type_info): New types.
(__throw_ios_failure): Define here.
* testsuite/27_io/ios_base/failure/dual_abi.cc: New.
* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
add -D_GLIBCXX_USE_CXX11_ABI=0 to dg-options.
* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/ios_base/storage/2.cc: Likewise.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/ios_base/failure/dual_abi.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/src/c++11/cxx11-ios_failure.cc
branches/gcc-6-branch/libstdc++-v3/src/c++11/ios.cc
branches/gcc-6-branch/libstdc++-v3/src/c++98/Makefile.am
branches/gcc-6-branch/libstdc++-v3/src/c++98/Makefile.in
branches/gcc-6-branch/libstdc++-v3/src/c++98/ios_failure.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc

[Bug libstdc++/66145] [5/6/7 Regression] std::ios_base::failure objects thrown from libstdc++.so use old ABI

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145

--- Comment #37 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:11 2018
New Revision: 263414

URL: https://gcc.gnu.org/viewcvs?rev=263414&root=gcc&view=rev
Log:
PR libstdc++/66145 allow catching iostream errors as cxx11 ios::failure

Define a new exception type derived from the gcc4-compatible ios::failure
which also aggregates an object of the ios::failure[abi:cxx11] type.
Make __throw_ios_failure throw this new type for iostream errors
that raise exceptions. Provide custom type info for the new type so that
it can be caught by handlers for ios::failure[abi:cxx11] type
as well as handlers for the gcc4-compatible ios::failure and its bases.

Backport from mainline
2018-04-10  Jonathan Wakely  

PR libstdc++/85222
* src/c++11/cxx11-ios_failure.cc (__construct_ios_failure)
(__destroy_ios_failure, is_ios_failure_handler): New functions.
* src/c++11/ios.cc (__throw_ios_failure): Remove definition.
(_GLIBCXX_USE_CXX11_ABI): Don't define here.
* src/c++98/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
ios_failure.cc to rewrite type info for __ios_failure.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/ios_failure.cc [_GLIBCXX_USE_DUAL_ABI]
(__iosfailure, __iosfailure_type_info): New types.
(__throw_ios_failure): Define here.
* testsuite/27_io/ios_base/failure/dual_abi.cc: New.
* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
add -D_GLIBCXX_USE_CXX11_ABI=0 to dg-options.
* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/ios_base/storage/2.cc: Likewise.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/ios_base/failure/dual_abi.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/src/c++11/cxx11-ios_failure.cc
branches/gcc-6-branch/libstdc++-v3/src/c++11/ios.cc
branches/gcc-6-branch/libstdc++-v3/src/c++98/Makefile.am
branches/gcc-6-branch/libstdc++-v3/src/c++98/Makefile.in
branches/gcc-6-branch/libstdc++-v3/src/c++98/ios_failure.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/exceptions_failbit.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/exceptions_failbit.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/ios_base/storage/2.cc

[Bug rtl-optimization/86882] [9 Regression] ICE in reg_overlap_mentioned_p, at rtlanal.c:1873

2018-08-08 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882

--- Comment #4 from Uroš Bizjak  ---
(In reply to Segher Boessenkool from comment #3)
> combine creates a clobber of const_int 0 to make sure a pattern will
> not match.  That is valid RTL, but further patterns constructed from
> that are not (clobber on a rhs).
> 
> The upper bits of a paradoxical subregs are defined in many cases,
> see SUBREG_PROMOTED_VAR_P; does that apply here?

It looks to me that "ZERO_EXTEND:SI (reg:QI)" is substituted with "AND:SI
(reg:SI, 0xff)", and some simplification involving XOR and AND RTXes generates
"AND (reg, 0xff00)".

[Bug libstdc++/86292] Missing exception safety when constructing vector from input iterator pair

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86292

--- Comment #8 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:37 2018
New Revision: 263419

URL: https://gcc.gnu.org/viewcvs?rev=263419&root=gcc&view=rev
Log:
PR libstdc++/86292 fix exception safety of std::vector
constructor

Backport from mainline
2018-06-25  Jonathan Wakely  

PR libstdc++/86292
* include/bits/stl_vector.h (vector::_M_range_initialize):
Add try-catch block.
* testsuite/23_containers/vector/cons/86292.cc: New.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/vector/cons/86292.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/stl_vector.h

[Bug libstdc++/68519] condition_variable::wait_for does not work properly with float duration

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68519

--- Comment #12 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:41 2018
New Revision: 263420

URL: https://gcc.gnu.org/viewcvs?rev=263420&root=gcc&view=rev
Log:
PR libstdc++/68519 use native duration to avoid rounding errors

Backport from mainline
2017-12-14  Jonathan Wakely  

PR libstdc++/68519
* include/std/condition_variable (condition_variable::wait_for):
Convert duration to native clock's duration before addition.
* testsuite/30_threads/condition_variable/members/68519.cc: New test.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/std/condition_variable

[Bug libstdc++/60555] std::system_category().default_error_condition() doesn't map system errno values to std::generic_category()

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60555

--- Comment #15 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:26 2018
New Revision: 263417

URL: https://gcc.gnu.org/viewcvs?rev=263417&root=gcc&view=rev
Log:
PR libstdc++/60555 std::system_category() should recognise POSIX errno values

Backport from mainline
2018-08-03  Jonathan Wakely  

* src/c++11/system_error.cc
(system_error_category::default_error_condition): Add workaround for
ENOTEMPTY and EEXIST having the same value on AIX.
* testsuite/19_diagnostics/error_category/system_category.cc: Add
extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.

Backport from mainline
2018-08-01  Jonathan Wakely  

PR libstdc++/60555
* src/c++11/system_error.cc
(system_error_category::default_error_condition): New override to
check for POSIX errno values.
* testsuite/19_diagnostics/error_category/generic_category.cc: New
* testsuite/19_diagnostics/error_category/system_category.cc: New
test.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/19_diagnostics/error_category/generic_category.cc
   
branches/gcc-6-branch/libstdc++-v3/testsuite/19_diagnostics/error_category/system_category.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/src/c++11/system_error.cc

gcc-bugs@gcc.gnu.org

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86734

--- Comment #6 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:21 2018
New Revision: 263416

URL: https://gcc.gnu.org/viewcvs?rev=263416&root=gcc&view=rev
Log:
PR libstdc++/86734 use addressof in reverse_iterator::operator->

Backport from mainline
2018-07-30  Jonathan Wakely  

PR libstdc++/86734
* include/bits/stl_iterator.h (reverse_iterator::operator->): Use
addressof (LWG 2188).
* testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/24_iterators/reverse_iterator/dr2188.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/stl_iterator.h

[Bug libstdc++/80893] std::vector creation dereferences null pointer

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80893

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 15:40:47 2018
New Revision: 263421

URL: https://gcc.gnu.org/viewcvs?rev=263421&root=gcc&view=rev
Log:
PR libstdc++/80893 Fix null dereference in vector

Backport from mainline
2017-06-17  Jonathan Wakely  

PR libstdc++/80893
* testsuite/23_containers/vector/bool/80893.cc: Add { target c++11 }.

Backport from mainline
2017-05-31  Jonathan Wakely  

PR libstdc++/80893
* include/bits/stl_bvector.h (vector::_M_initialize): Avoid
null pointer dereference when size is zero.
* testsuite/23_containers/vector/bool/80893.cc: New.
* testsuite/util/testsuite_allocator.h (PointerBase::PointerBase):
Add non-explicit constructor from nullptr.
(PointerBase::derived() const): Add const-qualified overload.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/vector/bool/80893.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/stl_bvector.h
branches/gcc-6-branch/libstdc++-v3/testsuite/util/testsuite_allocator.h

[Bug libstdc++/86597] directory_entry::exist et al forget to clear the error_code.

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86597

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #3 from Jonathan Wakely  ---
Fixed, thanks for the report.

[Bug libstdc++/60555] std::system_category().default_error_condition() doesn't map system errno values to std::generic_category()

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60555

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|8.3 |6.5

--- Comment #16 from Jonathan Wakely  ---
Fixed on all active branches, so will be fixed in the 6.5, 7.4, 8.3 and 9.1
releases.

[Bug libstdc++/86292] Missing exception safety when constructing vector from input iterator pair

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86292

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|7.4 |6.5

--- Comment #9 from Jonathan Wakely  ---
Fixed for 6.5, 7.4 and 8.2

[Bug c++/67491] [meta-bug] concepts issues

2018-08-08 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 86493, which changed state.

Bug 86493 Summary: [concepts] Hard error for "call to non-'constexpr' function" 
in a requires expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86493

   What|Removed |Added

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

[Bug c++/86493] [concepts] Hard error for "call to non-'constexpr' function" in a requires expression

2018-08-08 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86493

Casey Carter  changed:

   What|Removed |Added

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

--- Comment #1 from Casey Carter  ---
[temp.constr.atomic]/3 states:

  To determine if an atomic constraint is satisfied, the parameter mapping 
  and template arguments are first substituted into its expression. If
  substitution results in an invalid type or expression, the constraint is
  not satisfied. Otherwise, the lvalue-to-rvalue conversion is performed if
  necessary, and E shall be a constant expression of type bool.

"E shall be a constant expression" clearly indicates that a substitution that
produces a non-constant-expression is ill-formed, rather than causing the
constraint not to be satisfied. This is a defect in the language rather than a
bug in GCC.

[Bug target/86448] GCC 9 compiler generates slower code for spec 2006 milc on a power9 using -mcpu=power9 than using -mcpu=power8

2018-08-08 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86448

--- Comment #6 from kelvin at gcc dot gnu.org ---
I should also clarify regarding all of the above comments that the numbers I
have been reporting are the spec ratios.  I had misunderstood that these ratios
were encoded such that smaller values represented better performance.  So some
of my "interpretation remarks" are incorrect.  Still, my measurements do not
show the 2% difference that Michael observed, so there remains a question of
whether there is enough of a performance change to merit further exploration.

[Bug libstdc++/68519] condition_variable::wait_for does not work properly with float duration

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68519

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|7.4 |6.5

--- Comment #13 from Jonathan Wakely  ---
Fixed for 6.5 too.

[Bug libstdc++/80893] std::vector creation dereferences null pointer

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80893

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.5

--- Comment #8 from Jonathan Wakely  ---
Fixed for 6.5, 7.4 and later.

[Bug tree-optimization/86886] Gcc miscompiles at -O3 on valid code

2018-08-08 Thread helloqirun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86886

Qirun Zhang  changed:

   What|Removed |Added

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

--- Comment #5 from Qirun Zhang  ---
The programs in my bug report are invalid. I am closing this PR. Thanks for the
pointers.

[Bug libstdc++/85768] [9 Regression] FreeBSD bootstrap fails due to undefined reference to 'backtrace'

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85768

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #7 from Jonathan Wakely  ---
Let's close this, as the bootstrap problem is fixed.

[Bug libstdc++/83982] [6 Regression] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |6.5

--- Comment #11 from Jonathan Wakely  ---
Fixed for 6.5, 7.4, 8.2 and later.

[Bug libstdc++/83982] [6 Regression] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-08-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982

--- Comment #12 from Jonathan Wakely  ---
Author: redi
Date: Wed Aug  8 16:31:55 2018
New Revision: 263427

URL: https://gcc.gnu.org/viewcvs?rev=263427&root=gcc&view=rev
Log:
PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize

Construct new elements before moving existing ones, so that if a default
constructor throws, the existing elements are not left in a moved-from
state.

Backport from mainline
2018-06-14  Daniel Trebbien 
Jonathan Wakely  

PR libstdc++/83982
* include/bits/vector.tcc (vector::_M_default_append(size_type)):
Default-construct new elements before moving existing ones.
* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
New.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/vector.tcc

[Bug other/86890] GCC 8.2.0 fails to build with isl 0.20

2018-08-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86890

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #3 from Andrew Pinski  ---
Already fixed in the branches. Dup of bug 86724.

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

[Bug tree-optimization/86724] Compilation error with new isl 0.20 (missing includes)

2018-08-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724

Andrew Pinski  changed:

   What|Removed |Added

 CC||freddie_chopin at op dot pl

--- Comment #7 from Andrew Pinski  ---
*** Bug 86890 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/86891] New: [9 Regression] wrong code with -O -frerun-cse-after-loop -fno-tree-dominator-opts -fno-tree-fre

2018-08-08 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891

Bug ID: 86891
   Summary: [9 Regression] wrong code with -O
-frerun-cse-after-loop -fno-tree-dominator-opts
-fno-tree-fre
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: aarch64-unknown-linux-gnu

Created attachment 44520
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44520&action=edit
reduced testcase

Output:
$ aarch64-unknown-linux-gnu-gcc -O -frerun-cse-after-loop
-fno-tree-dominator-opts -fno-tree-fre testcase.c -static
$ ./a.out 
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-263387-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/9.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-263387-checking-yes-rtl-df-extra-aarch64
Thread model: posix
gcc version 9.0.0 20180808 (experimental) (GCC) 


The generated code:
main:
stp x29, x30, [sp, -32]!//,,,
mov x29, sp //,
// testcase.c:11:   u32 d = 7;
mov w0, 7   // tmp106,
str w0, [sp, 28]// tmp106, d
// testcase.c:12:   b = __builtin_sub_overflow_p ((u16) - d, (u128) ~ (u8) d,
a);
adrpx0, b   // tmp126,
strbwzr, [x0, #:lo12:b] //, b
// testcase.c:16: __builtin_abort();
bl  abort   //


just simply calls abort()

[Bug rtl-optimization/86892] New: RTL CSE commoning trivial constants across call and/or too early

2018-08-08 Thread pthaugen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86892

Bug ID: 86892
   Summary: RTL CSE  commoning trivial constants across call
and/or too early
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pthaugen at gcc dot gnu.org
CC: dje at gcc dot gnu.org, jakub at gcc dot gnu.org,
rsandifo at gcc dot gnu.org, segher at gcc dot gnu.org,
wschmidt at gcc dot gnu.org
  Target Milestone: ---
  Host: powerpc64le-unknown-linux-gnu
Target: powerpc64le-unknown-linux-gnu
 Build: powerpc64le-unknown-linux-gnu

For the following testcase cse.c will common the constant 0 across the call
which then requires the use of a non-volatile register (and prologue/epilogue
save/restore).

void bar();
int a, b;
void foo()
{
  a = 0;
  bar();
  b = 0;
}


I have also observed a situation where early cse of a constant prevented some
combine transformations from occurring because the register's lifetime had been
extended.

The feeling is that cse of trivial constants should not be done so early in the
pass schedule and should not be done across calls at all.

[Bug target/86651] [8/9 Regression] lto-wrapper.exe: fatal error: simple_object_copy_lto_debug_sections not implemented: Invalid argument

2018-08-08 Thread jwjagersma at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86651

--- Comment #17 from jwjagersma at gmail dot com ---
If anyone opens a new PR, please cc me. I am unable to contribute right now due
to some health issues.

[Bug target/82418] Division on a constant is suboptimal because of not using imul instruction

2018-08-08 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82418

Alexander Monakov  changed:

   What|Removed |Added

 CC||uros at gcc dot gnu.org

--- Comment #6 from Alexander Monakov  ---
(the 'divx' function in comment 5 does not implement division by 100)

I'd like to see GCC improve here, so I looked at how this could be fixed. I'm
afraid adjusting expand_divmod to select the cheaper alternative on x86 is
going to be too complicated. I think it may be reasonable to conceal the 32x32
mul-highpart pattern on x86 from expand_divmod, so it uses the 32x32->64
widening multiply which leads to optimal code.

I also think the 32x32 mul-highpart pattern is not very useful outside of magic
division by constants, so concealing it altogether may be acceptable if no
better solution is available.

(to recap, we want 64-bit imul here rather than 32-bit widening mul with result
in edx:eax, because imul has better latency and throughput, less regalloc
constraints, and doesn't need a register to hold the immediate)

Patch I'm testing to disallow 32x32 mul-highpart on 64-bit x86:

--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -1042,6 +1042,10 @@ (define_mode_iterator SWIM248 [(HI "TARGET_HIMODE_MATH")
 (define_mode_iterator DWI [(DI "!TARGET_64BIT")
   (TI "TARGET_64BIT")])

+;; Widest single word integer modes.
+(define_mode_iterator SWI48W [(SI "!TARGET_64BIT")
+ (DI "TARGET_64BIT")])
+
 ;; GET_MODE_SIZE for selected modes.  As GET_MODE_SIZE is not
 ;; compile time constant, it is faster to use  than
 ;; GET_MODE_SIZE (mode).  For XFmode which depends on
@@ -7792,16 +7796,16 @@ (define_insn "*mulqihi3_1"
(set_attr "mode" "QI")])

 (define_expand "mul3_highpart"
-  [(parallel [(set (match_operand:SWI48 0 "register_operand")
-  (truncate:SWI48
+  [(parallel [(set (match_operand:SWI48W 0 "register_operand")
+  (truncate:SWI48W
 (lshiftrt:
   (mult:
 (any_extend:
-  (match_operand:SWI48 1 "nonimmediate_operand"))
+  (match_operand:SWI48W 1 "nonimmediate_operand"))
 (any_extend:
-  (match_operand:SWI48 2 "register_operand")))
+  (match_operand:SWI48W 2 "register_operand")))
   (match_dup 3
- (clobber (match_scratch:SWI48 4))
+ (clobber (match_scratch:SWI48W 4))
  (clobber (reg:CC FLAGS_REG))])]
   ""
   "operands[3] = GEN_INT (GET_MODE_BITSIZE (mode));")

[Bug target/82418] Division on a constant is suboptimal because of not using imul instruction

2018-08-08 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82418

--- Comment #7 from Uroš Bizjak  ---
(In reply to Alexander Monakov from comment #6)

> +;; Widest single word integer modes.
> +(define_mode_iterator SWI48W [(SI "!TARGET_64BIT")
> + (DI "TARGET_64BIT")])

Please use existing DWIH mode iterator instead.

[Bug fortran/86893] New: implement F202x .andthen. / .orelse. operators

2018-08-08 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86893

Bug ID: 86893
   Summary: implement F202x .andthen. / .orelse. operators
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: janus at gcc dot gnu.org
  Target Milestone: ---

The .and. / .or. operators in the current F2018 standard do not make any
guarantees about whether any of the arguments is required to be evaluated, or
is required to  be optimized out.

There are rumors that new "short-circuiting" operators might be part of an
upcoming F202x standard. Those could be named .andthen., .andelse., .orelse. or
similar. Alternatively one could use C-style operators (&& and ||).

The new operators would be guaranteed to do left-to-right short-circuiting,
i.e. the second operand will not be evaluated if the value of the first one
already determines the final result.

Consequently the old .and. / .or. operators would be guaranteed to *not* do
short-circuiting (or only in cases where it makes no difference).

[Bug target/46179] Codegen/TLS: invalid assembler syntax

2018-08-08 Thread schwab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179

--- Comment #13 from Andreas Schwab  ---
Author: schwab
Date: Wed Aug  8 20:01:26 2018
New Revision: 263432

URL: https://gcc.gnu.org/viewcvs?rev=263432&root=gcc&view=rev
Log:
m68k: handle more cases of TLS symbols with offset

PR target/46179
* config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
* config/m68k/m68k.c (handle_move_double): Don't call
m68k_final_prescan_insn.
(m68k_adjust_decorated_operand): Renamed from
m68k_final_prescan_insn, remove first and third operand and
simplify.
(print_operand): Call it.
(print_operand_address): Call it.

PR target/46179
* gcc.target/m68k/tls-dimode.c: New file.

Added:
trunk/gcc/testsuite/gcc.target/m68k/tls-dimode.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m68k/m68k.c
trunk/gcc/config/m68k/m68k.h
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/86882] [9 Regression] ICE in reg_overlap_mentioned_p, at rtlanal.c:1873

2018-08-08 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882

--- Comment #5 from Segher Boessenkool  ---
So what is wrong about that?  CONST_INTs are sign-extended always, so
0xff00 is just fine?

[Bug rtl-optimization/86892] RTL CSE commoning trivial constants across call and/or too early

2018-08-08 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86892

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #1 from Segher Boessenkool  ---
If you use another constant instead of 0, it fails on most platforms. 
Confirmed.

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2018-08-08 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
.

[Bug c/86894] New: error for a zero-length array initialized with empty braced list

2018-08-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86894

Bug ID: 86894
   Summary: error for a zero-length array initialized with empty
braced list
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

As discussed in the review at
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00601.html, when -Wpedantic is
used, GCC rejects the following program with a hard error when it should be
accepted with a pedantic warning.

$ cat e.c && gcc -S -Wall -Wextra -Wpedantic e.c
char a[] = { };
e.c:1:12: warning: ISO C forbids empty initializer braces [-Wpedantic]
 char a[] = { };
^
e.c:1:6: error: zero or negative size array ‘a’
 char a[] = { };
  ^

[Bug c++/86503] Segmentation fault signal terminated

2018-08-08 Thread zhonghao at pku dot org.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86503

--- Comment #3 from zhonghao at pku dot org.cn ---
(In reply to Richard Biener from comment #1)
> You run out of memory or stack.  Try ulimit -s unlimited

I tried  ulimit -s unlimited. This time, the error messages are as follows:

g++ -ftemplate-depth=100 test.cpp 
test.cpp: In substitution of 'template __typeof__ (ft(F(), 0)) ft(F, typename enable_if<(n != 0), int>::type) [with F =
main()::a*; int n = -97]':
test.cpp:14:21:   recursively required by substitution of 'template __typeof__ (ft(F(), 0)) ft(F, typename enable_if<(n != 0),
int>::type) [with F = main()::a*; int n = 1]'
test.cpp:14:21:   required by substitution of 'template
__typeof__ (ft(F(), 0)) ft(F, typename enable_if<(n != 0),
int>::type) [with F = main()::a*; int n = 2]'
test.cpp:18:30:   required from here
test.cpp:14:21: fatal error: template instantiation depth exceeds maximum of
100 (use -ftemplate-depth= to increase the maximum)
 typeof( ft< F, n-1 >( F(), 0 ) )
   ~~^~~~
compilation terminated.

[Bug c/82967] "did you mean" suggestions are way too suggestive

2018-08-08 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82967

Eric Gallager  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=81419

--- Comment #5 from Eric Gallager  ---
ASSIGNED since there's an assignee. Also possibly related to bug 81419

[Bug tree-optimization/86889] s390x gcc build fails when configured with --disable-checking

2018-08-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86889

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
 CC||msebor at gcc dot gnu.org
 Blocks||56456

--- Comment #1 from Martin Sebor  ---
I can't confirm it yet.  Could you attach a test case or a preprocessing
translation unit?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456
[Bug 56456] [meta-bug] bogus/missing -Warray-bounds

[Bug rtl-optimization/86882] [9 Regression] ICE in reg_overlap_mentioned_p, at rtlanal.c:1873

2018-08-08 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86882

--- Comment #6 from Uroš Bizjak  ---
(In reply to Segher Boessenkool from comment #5)
> So what is wrong about that?  CONST_INTs are sign-extended always, so
> 0xff00 is just fine?

As said in Comment #2, it is not wrong, just suspicious.

(insn 10 9 11 3 (set (reg:SI 94 [  ])
(zero_extend:SI (reg:QI 92 [  ]))) "pr86882.c":10 140
{*zero_extendqisi2}
 (nil))
(insn 11 10 13 3 (parallel [
(set (reg:SI 95 [ jd ])
(xor:SI (reg:SI 94 [  ])
(const_int 257 [0x101])))
(clobber (reg:CC 17 flags))
]) "pr86882.c":10 461 {*xorsi_1}
 (expr_list:REG_DEAD (reg:SI 94 [  ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil
(insn 13 11 14 3 (parallel [
(set (reg:HI 97)
(xor:HI (subreg:HI (reg:SI 95 [ jd ]) 0)
(subreg:HI (reg:QI 92 [  ]) 0)))
(clobber (reg:CC 17 flags))
]) "pr86882.c":11 459 {*xorhi_1}
 (expr_list:REG_DEAD (reg:SI 95 [ jd ])
(expr_list:REG_DEAD (reg:QI 92 [  ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)

gets combined to:

Trying 10, 11 -> 13:

Successfully matched this instruction:
(set (reg:HI 95 [ jd ])
(and:HI (subreg:HI (reg:QI 92 [  ]) 0)
(const_int -256 [0xff00])))
Successfully matched this instruction:
(set (reg:HI 97)
(xor:HI (reg:HI 95 [ jd ])
(const_int 257 [0x101])))

The first one operates on paradoxical HImode subreg of QImode input operand
(valid bitmask 0xff), which is masked with 0xff00. The result is a value, which
has only highpart unmasked and lowpart = 0x00. Later, a couple instructions
operate in HImode, but finally we get to:

(insn 14 13 15 3 (set (reg:QI 92 [  ])
(subreg:QI (reg:HI 97) 0)) "pr86882.c":11 88 {*movqi_internal}
 (nil))

which discards paradoxical highpart from the Himode operations. So, I guess the
above is OK (but I didn't check the validity of XOR and AND simplifications in
different modes).

It looks to me that the invalid RTX from comment #1 should read:

(set (reg:QI 97)
(const_int 1 [0x1]))