[Bug bootstrap/64919] bootstrap failure of gcc-4.9.2 on ia64-hpux in libgcc

2016-10-03 Thread alm at sibmail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64919

--- Comment #33 from Alexander  ---
build 4.9.x ok, only with workarounds in this conversation.

[Bug c++/64767] Could GCC warn when a pointer is compared against '\0'?

2016-10-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64767

--- Comment #7 from Marek Polacek  ---
This code is now rejected in C++11.  See r240707.

[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective

2016-10-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek  ---
Interesting, I can't reproduce:

$ ./cc1 -quiet -Wimplicit-fallthrough ft.c
$

[Bug c++/77822] New: [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread costamagnagianfranco at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

Bug ID: 77822
   Summary: [6 REGRESSION] arm64 Error: immediate value out of
range 0 to 63 at operand 3
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: costamagnagianfranco at yahoo dot it
  Target Milestone: ---

As said, mame on arm64 is not building anymore in Debian unstable, since the
gcc-6 switch.
According to Matthias Klose this seems to be a gcc-6 regression, so I'm opening
this bug
Debing bug here
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839249

and attached the preprocessed sources

Compiling src/emu/emumem.cpp...
g++ -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -fPIE -fstack-protector-strong
-Wformat -Werror=format-security -g0 -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=.
-fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -MMD -MP -MP -DNDEBUG
-DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DMAME_NOASM -DLUA_COMPAT_ALL
-DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DPTR64=1 -DNO_AFFINITY_NP
-I../../../../../src/osd -I../../../../../src/emu -I../../../../../src/lib
-I../../../../../src/lib/util -I../../../../../3rdparty
-I../../../../generated/emu -I../../../../generated/emu/layout
-I../../../../../scripts/src   -pipe -Wno-deprecated-declarations -O3
-fno-strict-aliasing -mabi=lp64 -Wno-unknown-pragmas -Wall -Wcast-align -Wundef
-Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion
-Wno-unused-result -Wno-array-bounds -Wno-cast-align -x c++ -std=c++14
-Woverloaded-virtual -Wsuggest-override -flifetime-dse=1 -include obj/R
 elease/emu.h -o "obj/Release/src/emu/emumem.o" -c
"../../../../../src/emu/emumem.cpp"
{standard input}: Assembler messages:
{standard input}:27954: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,64,32'
{standard input}:27959: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,96,32'
{standard input}:27964: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,128,32'
{standard input}:27969: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,160,32'
{standard input}:27974: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,192,32'
{standard input}:28638: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,64,16'
{standard input}:28643: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,80,16'
{standard input}:28648: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,96,16'
{standard input}:28653: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,112,16'
{standard input}:28658: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,128,16'
{standard input}:28663: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,144,16'
{standard input}:28668: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,160,16'
{standard input}:28673: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,176,16'
{standard input}:28678: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,192,16'
{standard input}:28683: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,208,16'
{standard input}:28688: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,224,16'
{standard input}:31708: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,64,32'
{standard input}:31713: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,96,32'
{standard input}:31718: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,128,32'
{standard input}:31723: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,160,32'
{standard input}:31728: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,192,32'
{standard input}:32454: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,64,16'
{standard input}:32459: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,80,16'
{standard input}:32464: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,96,16'
{standard input}:32469: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,112,16'
{standard input}:32474: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,128,16'
{standard input}:32479: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,144,16'
{standard input}:32484: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,160,16'
{standard input}:32489: Error: immediate value out of range 0 to 63 at operand
3 -- `ubfx x0,x2,176,16'
{standard input}:32494: Error: immediate value out of range 0 to 

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread costamagnagianfranco at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

--- Comment #1 from Gianfranco  ---
Created attachment 39732
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39732&action=edit
s file

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread costamagnagianfranco at yahoo dot it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

--- Comment #2 from Gianfranco  ---
Created attachment 39733
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39733&action=edit
preprocessed source

[Bug middle-end/77816] [7 Regression] lots of fortran tests fail on aarch64-linux-gnu

2016-10-03 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77816

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #4 from ktkachov at gcc dot gnu.org ---
I can't reproduce the fortran failures with a clean trunk at r240705 configured
with --enable-languages=c,c++,fortran --disable-bootstrap --disable-werror
--enable-plugins --enable-gnu-indirect-function

I don't have access to an environment that allows me to bootstrap Ada.
I'll revert the patch while I investigate

[Bug middle-end/77816] [7 Regression] lots of fortran tests fail on aarch64-linux-gnu

2016-10-03 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77816

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-10-03
 Ever confirmed|0   |1

--- Comment #5 from ktkachov at gcc dot gnu.org ---
I reverted r240649. Can you please confirm that it fixes your issues and close
this if appropriate?

[Bug bootstrap/32497] Crosscomiling native sh3 gcc on a 64-bit host fails

2016-10-03 Thread uwe at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32497

--- Comment #3 from Valeriy E. Ushakov  ---
The patch above has been committed to the NetBSD imported version of gcc back
in April 2008 and has been merged in all the new imported versions ever since.

It's been quite a few years so I don't remember most details, however I assume
the patch is still relevant.  I will try to back it out and see what happens.

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-10-03
 CC||ktkachov at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from ktkachov at gcc dot gnu.org ---
I can't compile this:
fatal error: ./obj/Release/emu.h.gch: couldn't open PCH file: No such file or
directory

[Bug middle-end/64516] [5 Regression] arm: wrong unaligned load generated

2016-10-03 Thread markus at oberhumer dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64516

--- Comment #11 from Markus F.X.J. Oberhumer  ---
Did you have a chance to backport this for 5.5 yet ?

Thanks,
Markus

[Bug sanitizer/77823] New: [7 Regression] ICE: in ubsan_encode_value, at ubsan.c:137 with -fsanitize=undefined and vector types

2016-10-03 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77823

Bug ID: 77823
   Summary: [7 Regression] ICE: in ubsan_encode_value, at
ubsan.c:137 with -fsanitize=undefined and vector types
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -fsanitize=undefined -Wno-psabi testcase.c 
testcase.c: In function 'foov':
testcase.c:7:3: internal compiler error: in ubsan_encode_value, at ubsan.c:137
   return v << 30;
   ^~
0xc0647c ubsan_encode_value(tree_node*, bool)
/repo/gcc-trunk/gcc/ubsan.c:137
0x6eac0b ubsan_instrument_shift(unsigned int, tree_code, tree_node*,
tree_node*)
/repo/gcc-trunk/gcc/c-family/c-ubsan.c:192
0x628bc9 build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int)
/repo/gcc-trunk/gcc/c/c-typeck.c:11764
0x62d3b3 parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr)
/repo/gcc-trunk/gcc/c/c-typeck.c:3616
0x63dab3 c_parser_binary_expression
/repo/gcc-trunk/gcc/c/c-parser.c:6855
0x63dea5 c_parser_conditional_expression
/repo/gcc-trunk/gcc/c/c-parser.c:6495
0x63e5a0 c_parser_expr_no_commas
/repo/gcc-trunk/gcc/c/c-parser.c:6412
0x63ec32 c_parser_expression
/repo/gcc-trunk/gcc/c/c-parser.c:8608
0x63f639 c_parser_expression_conv
/repo/gcc-trunk/gcc/c/c-parser.c:8641
0x65956f c_parser_statement_after_labels
/repo/gcc-trunk/gcc/c/c-parser.c:5334
0x65ae01 c_parser_compound_statement_nostart
/repo/gcc-trunk/gcc/c/c-parser.c:4944
0x65b65e c_parser_compound_statement
/repo/gcc-trunk/gcc/c/c-parser.c:4777
0x657053 c_parser_declaration_or_fndef
/repo/gcc-trunk/gcc/c/c-parser.c:2176
0x662a03 c_parser_external_declaration
/repo/gcc-trunk/gcc/c/c-parser.c:1574
0x663489 c_parser_translation_unit
/repo/gcc-trunk/gcc/c/c-parser.c:1454
0x663489 c_parse_file()
/repo/gcc-trunk/gcc/c/c-parser.c:18173
0x6ca0e2 c_common_parse_file()
/repo/gcc-trunk/gcc/c-family/c-opts.c:1072
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


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

The failing line is:
ubsan.c
134:  return fold_convert (pointer_sized_int_node, t);
135:}
136:   default:
137:gcc_unreachable ();
138:   }
139:   else
140: {

[Bug sanitizer/77823] [7 Regression] ICE: in ubsan_encode_value, at ubsan.c:137 with -fsanitize=undefined and vector types

2016-10-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77823

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-03
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.

[Bug c++/77815] access to destructor via decltype-specifier

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77815

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-03
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
That's not a valid testcase, please read https://gcc.gnu.org/bugs/ again.

Confirmed for:

void f()
{
  struct T { };
  T t;
  t.~decltype(t)();
}

As a workaround you can define a new alias and use that in the
pseudo-destructor-name:

  using U = decltype(t);
  t.~U();

[Bug tree-optimization/77824] New: unreachable code in SLSR GIMPLE pass

2016-10-03 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77824

Bug ID: 77824
   Summary: unreachable code in SLSR GIMPLE pass
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ebotcazou at gcc dot gnu.org
  Target Milestone: ---

I played a little with the SLSR GIMPLE pass and, while it's clearly written and
very well documented, it contains an oversight which deactivates a small part
of the processing:

/* Given GS which is a copy of a scalar integer type, make at least one
   appropriate entry in the candidate table.

   This interface is included for completeness, but is unnecessary
   if this pass immediately follows a pass that performs copy 
   propagation, such as DOM.  */

static void
slsr_process_copy (gimple *gs, tree rhs1, bool speed)


slsr_process_copy is never invoked because it's called from:

case MODIFY_EXPR:
  slsr_process_copy (gs, rhs1, speed);
  break;

and there are no MODIFY_EXPRs left in GIMPLE.  I think that all occurrences of
MODIFY_EXPR should be replaced with SSA_NAME in the file.  And, at least in the
case I played with, the additional processing makes a difference because there
are unpropagated copies in the GIMPLE IR.

Another minor nit: in replace_mult_candidate

  if (wi::fits_shwi_p (bump)
  && bump.to_shwi () != HOST_WIDE_INT_MIN
  /* It is not useful to replace casts, copies, or adds of
 an SSA name and a constant.  */
  && cand_code != MODIFY_EXPR
  && !CONVERT_EXPR_CODE_P (cand_code)
  && cand_code != PLUS_EXPR
  && cand_code != POINTER_PLUS_EXPR
  && cand_code != MINUS_EXPR)

Why not just testing c->kind instead of cand_code?

[Bug bootstrap/32497] Crosscomiling native sh3 gcc on a 64-bit host fails

2016-10-03 Thread uwe at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32497

--- Comment #4 from Valeriy E. Ushakov  ---
Seems to fail more or less the same way without the patch.  NetBSD current with
gcc 5.4.0.  Building on linux/amd64.  When native gcc is cross compiled

shle--netbsdelf-c++ ... -c insn-emit.c

fails with:

insn-emit.c:6382:3: error: this decimal constant is unsigned only in ISO C90
[-Werror]

This is about 4294967295L in gen_mshflo_l_di().   It no longer complains about
-4294967296L in gen_mshfhi_l_di() just above, though.  The relevant fragment of
insn-emit.c is:

/*
/home/uwe/work/netbsd/ro/src/external/gpl3/gcc/dist/gcc/config/sh/sh.md:15987
*/
rtx
gen_mshfhi_l_di (rtx operand0 ATTRIBUTE_UNUSED,
rtx operand1 ATTRIBUTE_UNUSED,
rtx operand2 ATTRIBUTE_UNUSED)
{
  return gen_rtx_SET (VOIDmode,
operand0,
gen_rtx_IOR (DImode,
gen_rtx_LSHIFTRT (DImode,
operand1,
const_int_rtx[MAX_SAVED_CONST_INT + (32)]),
gen_rtx_AND (DImode,
operand2,
GEN_INT (-4294967296L;
}

/*
/home/uwe/work/netbsd/ro/src/external/gpl3/gcc/dist/gcc/config/sh/sh.md:16037
*/
rtx
gen_mshflo_l_di (rtx operand0 ATTRIBUTE_UNUSED,
rtx operand1 ATTRIBUTE_UNUSED,
rtx operand2 ATTRIBUTE_UNUSED)
{
  return gen_rtx_SET (VOIDmode,
operand0,
gen_rtx_IOR (DImode,
gen_rtx_AND (DImode,
operand1,
GEN_INT (4294967295L)),
gen_rtx_ASHIFT (DImode,
operand2,
const_int_rtx[MAX_SAVED_CONST_INT + (32)])));
}

[Bug lto/77821] C++ binary size increase or LTO not working?

2016-10-03 Thread tulipawn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77821

--- Comment #2 from PeteVine  ---
Is there a quick way to verify the installation is not broken re: LTO? I'd like
to avoid posting lots of useless info through a stupid user error :)

For example, GCC7 was configured/installed this way:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc7/lib/gcc/arm-linux-gnueabihf/7.0.0/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../configure -v --enable-languages=c,c++,fortran
--prefix=/usr/gcc7 --program-suffix=-7 --enable-shared --enable-linker-build-id
--libexecdir=/usr/gcc7/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/gcc7/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=gcc4-compatible
--enable-gnu-unique-object --disable-libitm --disable-libquadmath
--enable-plugin --with-system-zlib --disable-browser-plugin
--with-arch-directory=arm --enable-multiarch --enable-multilib
--disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3
--with-float=hard --with-mode=arm --disable-werror --enable-multilib
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160916 (experimental) (GCC)

Every time I switch to a different gcc version I run a script that changes the
following symlinks: gcc, g++, gfortran, ar, nm, ranlib, gcov, gcov-tool to
their corresponding versioned instances. Never had any problems so far, apart
from having to set LD_LIBRARY_PATH for running C++ binaries compiled against
newer libstdc++.

[Bug libstdc++/77814] build fails trying to build eh_arm

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77814

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-10-03
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Presumably this target doesn't #define NO_IMPLICIT_EXTERN_C

All targets should define that in this day and age. I hate that stupid option.

[Bug libstdc++/77802] [7 Regression] Boost Fiber doesn't compile

2016-10-03 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77802

Ville Voutilainen  changed:

   What|Removed |Added

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

--- Comment #4 from Ville Voutilainen  ---
Fixed.

[Bug libstdc++/77802] [7 Regression] Boost Fiber doesn't compile

2016-10-03 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77802

--- Comment #3 from ville at gcc dot gnu.org ---
Author: ville
Date: Mon Oct  3 11:06:53 2016
New Revision: 240709

URL: https://gcc.gnu.org/viewcvs?rev=240709&root=gcc&view=rev
Log:
PR libstdc++/77802
* testsuite/20_util/tuple/77802.cc: New.

Revert:
2016-09-21  Ville Voutilainen  
Implement LWG 2729 for tuple.
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)):
Suppress conditionally.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise.
(__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New.
(_Tuple_impl(const _Head&)): Constrain.
(_Tuple_impl(_UHead&&)): Likewise.
(_Tuple_impl(_Tuple_impl&&)): Suppress conditionally.
(_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally.
(operator=(tuple&&)): Suppress conditionally.
(operator=(const tuple<_UElements...>&)): Constrain.
(operator=(tuple<_UElements...>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally (2-param tuple).
(operator=(tuple&&)): Suppress conditionally (2-param tuple).
(operator=(const tuple<_U1, _U2>&)): Constrain.
(operator=(tuple<_U1, _U2>&&)): Likewise.
(operator=(const pair<_U1, _U2>&)): Likewise.
(operator=(pair<_U1, _U2>&&)): Likewise.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
* testsuite/20_util/tuple/tuple_traits.cc: New.

Added:
trunk/libstdc++-v3/testsuite/20_util/tuple/77802.cc
Removed:
trunk/libstdc++-v3/testsuite/20_util/tuple/tuple_traits.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/tuple
trunk/libstdc++-v3/testsuite/20_util/tuple/element_access/get_neg.cc

[Bug c++/77825] New: return type deduction regression in 7.0

2016-10-03 Thread barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77825

Bug ID: 77825
   Summary: return type deduction regression in 7.0
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: barry.revzin at gmail dot com
  Target Milestone: ---

Can't come up with a more reduced example, but consider this code that makes a
Y combinator version of factorial and calls it:

#include 
#include 

template 
struct y_combinator {
F f;

template 
decltype(auto) operator()(Args&&... args) const
{
return f(*this, std::forward(args)...);
}
};
template 
y_combinator> make_y_combinator(F&& f) {
return {std::forward(f)};
}

int main() {
auto factorial = make_y_combinator([](auto fact, int n) -> int {
if (n == 0) return 1;
elsereturn n * fact(n - 1);
});
factorial(5);
}

The code is well formed, operator() returns decltype(auto), but f is a lambda
that explicitly returns int. The code compiles in 4.9.3, 5.3, and 6.1, but
fails on trunk 7.0 with:

prog.cc: In instantiation of 'main():: [with auto:1 =
y_combinator >]':
prog.cc:11:52:   required from 'decltype(auto)
y_combinator::operator()(Args&& ...) const [with Args = {int}; F =
main()::]'
prog.cc:24:16:   required from here
prog.cc:22:36: error: use of 'decltype(auto) y_combinator::operator()(Args&&
...) const [with Args = {int}; F = main()::]' before
deduction of 'auto'
 elsereturn n * fact(n - 1);
^~~

[Bug libstdc++/77814] build fails trying to build eh_arm

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77814

--- Comment #2 from Jonathan Wakely  ---
testsuite/17_intro/headers/c++2011/linkage.cc should have caught this, but
didn't due to  hiding the problem.

[Bug sanitizer/77823] [7 Regression] ICE: in ubsan_encode_value, at ubsan.c:137 with -fsanitize=undefined and vector types

2016-10-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77823

Jakub Jelinek  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
   Target Milestone|--- |7.0

--- Comment #2 from Jakub Jelinek  ---
Started with r238936, I'll have a look.

[Bug libstdc++/77814] build fails trying to build eh_arm

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77814

--- Comment #3 from Jonathan Wakely  ---
Patch being testing now:
https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00058.html

[Bug middle-end/77816] [7 Regression] lots of fortran tests fail on aarch64-linux-gnu

2016-10-03 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77816

Bernd Edlinger  changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #6 from Bernd Edlinger  ---
(In reply to ktkachov from comment #4)
> I can't reproduce the fortran failures with a clean trunk at r240705
> configured with --enable-languages=c,c++,fortran --disable-bootstrap
> --disable-werror --enable-plugins --enable-gnu-indirect-function
> 
> I don't have access to an environment that allows me to bootstrap Ada.
> I'll revert the patch while I investigate

Kyrill,

this may have nothing to do with this,
but I wonder if this is correct,
to do the ~ and - in HOST_WIDE_INT
instead of the target mode of the computation:

if (eq_side_val == ~cstval)
op_code = NOT
else if (eq_side_val != HOST_WIDE_INT_MIN && (cstval == -eq_side_val))
op_code = NEG;


Regarding the Ada, you can boot-strap Ada from a PC to your target.
you first have to full bootstrap on a PC with working gcc/Ada,

then using that a cross with --target=aarch64...
then using that a canadian-cross with --host=aarch64 --target=aarch64

the result should run on your target, and allow a full bootstrap
with Ada.

I have done that for arm, but aarch64 should not be different.

Bernd.

[Bug tree-optimization/77820] A jump threading opportunity with conditionals

2016-10-03 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77820

--- Comment #2 from Segher Boessenkool  ---
Note that combine cannot optimise the

csetw0, lt
cbnzw0, .L6

to

blt .L6

because the two insns are in different BBs still.  The final branch
isn't duplicated until bb-reorder.  (The two scc's use the same pseudo
as well).

This should be handled before expand imho.

[Bug target/77826] New: [7 Regression] ICE in decompose, at wide-int.h:928 w/ -m64 -O2 and above

2016-10-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77826

Bug ID: 77826
   Summary: [7 Regression] ICE in decompose, at wide-int.h:928 w/
-m64 -O2 and above
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

At least gcc-7.0.0-alpha20160925 and gcc-7.0.0-alpha20161002 ICE when compiling
the following reduced snippet at -O2 (-Os, -O2, -Ofast):

void
fi(unsigned long int *v0, unsigned int ow, int q2)
{
  if (ow + q2 != 0)
if (q2 == 1)
{
  *v0 |= q2;
  q2 ^= *v0;
}
}

% x86_64-pc-linux-gnu-gcc-7.0.0-alpha20161002 -O2 -c cj0mr0fp.c
cj0mr0fp.c: In function 'fi':
cj0mr0fp.c:10:1: internal compiler error: in decompose, at wide-int.h:928
 }
 ^

I cannot reproduce it w/ -m32, or w/ the same snapshot targeted against 32-bit
BE powerpc.

[Bug libstdc++/77814] build fails trying to build eh_arm

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77814

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #5 from Jonathan Wakely  ---
Should be fixed now, please re-open if not.

[Bug libstdc++/77814] build fails trying to build eh_arm

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77814

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 11:50:46 2016
New Revision: 240710

URL: https://gcc.gnu.org/viewcvs?rev=240710&root=gcc&view=rev
Log:
Ensure "C++" language linkage for std::abs overloads

PR libstdc++/77814
* include/bits/std_abs.h: Use "C++" language linkage.
* testsuite/17_intro/headers/c++2011/linkage.cc: Move  to
the end. Add .

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/std_abs.h
trunk/libstdc++-v3/testsuite/17_intro/headers/c++2011/linkage.cc

[Bug bootstrap/32497] Crosscomiling native sh3 gcc on a 64-bit host fails

2016-10-03 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32497

Oleg Endo  changed:

   What|Removed |Added

 CC||olegendo at gcc dot gnu.org

--- Comment #5 from Oleg Endo  ---
(In reply to Valeriy E. Ushakov from comment #4)

> GEN_INT (-4294967296L;

> GEN_INT (4294967295L)),

I think those should be -4294967296LL and 4294967295LL.  Do you have that build
setup at hand to try this out?

BTW, those two patterns do not exist anymore in trunk, as SH5 stuff has been
removed.

[Bug sanitizer/77823] [7 Regression] ICE: in ubsan_encode_value, at ubsan.c:137 with -fsanitize=undefined and vector types

2016-10-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77823

--- Comment #3 from Jakub Jelinek  ---
Created attachment 39735
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39735&action=edit
gcc7-pr77823.patch

Short patch to fix the ICE.

That said, we should think of what to do with the generic vector extension for
-fsanitize=undefined, right now we don't instrument anything.
For stuff like shift, division, signed-integer-overflow, maybe also bool/enum
for vectors of bool or enum, float-divide/float-cast, we either should modify
the libubsan library, so that it would handle TK_Vector_Integer and
TK_Vector_Float, likely use always passing by reference and somehow encode both
the bit width of the elements and their kinds and also the number of elements
in the vector (or log2 thereof) in the TypeInfo field and teach it how to print
vectors {El1, El2, El3, El4} etc.? - then we could at least for some of the
tests use also vector operations, e.g. for vector << vector shifts compare the
second operand against vector containing element precision repeated, etc., or
instead instrument it as a loop over number of elements, checking each
operation separately (and reporting the individual overflow on each element
separately, then as value we'd just use the scalars).

[Bug c++/77791] ICE on invalid C++11 code with redefined function parameter: tree check: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in cp_parser_lambda_declarator_opt, at

2016-10-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77791

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Started most likely with the addition of lambda support in r152318, at least
r152438 already ICEs.

[Bug sanitizer/77823] [7 Regression] ICE: in ubsan_encode_value, at ubsan.c:137 with -fsanitize=undefined and vector types

2016-10-03 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77823

--- Comment #4 from Zdenek Sojka  ---
(In reply to Jakub Jelinek from comment #3)
> Created attachment 39735 [details]
> gcc7-pr77823.patch
> 
> Short patch to fix the ICE.
> 
> That said, we should think of what to do with the generic vector extension
> for -fsanitize=undefined, right now we don't instrument anything.
> For stuff like shift, division, signed-integer-overflow, maybe also
> bool/enum for vectors of bool or enum, float-divide/float-cast, we either
> should modify
> the libubsan library, so that it would handle TK_Vector_Integer and
> TK_Vector_Float, likely use always passing by reference and somehow encode
> both the bit width of the elements and their kinds and also the number of
> elements in the vector (or log2 thereof) in the TypeInfo field and teach it
> how to print vectors {El1, El2, El3, El4} etc.? - then we could at least for
> some of the tests use also vector operations, e.g. for vector << vector
> shifts compare the second operand against vector containing element
> precision repeated, etc., or instead instrument it as a loop over number of
> elements, checking each operation separately (and reporting the individual
> overflow on each element separately, then as value we'd just use the
> scalars).

Adding ubsan support would be very useful, since when auto-reducing a
wrong-code bug, I often end up with useless code like:

typedef unsigned V __attribute__((vector_size(64)));

int foo(V v)
{
  /* returning out-of-bounds item, not handled by ubsan */
  return v[127];
}

or

V foo(V v)
{
  /* out-of-range shift, not handled by ubsan */
  return v << 127;
}

even though I am using -fsanitize=undefined.

[Bug c++/77791] ICE on invalid C++11 code with redefined function parameter: tree check: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in cp_parser_lambda_declarator_opt, at

2016-10-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77791

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Created attachment 39736
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39736&action=edit
gcc7-pr77791.patch

Untested fix.

[Bug c++/77790] [5/6/7 Regression] ICE on valid C++14 code when compiling with "-std=c++11": in push_access_scope, at cp/pt.c:227

2016-10-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77790

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |5.5
Summary|ICE on valid C++14 code |[5/6/7 Regression] ICE on
   |when compiling with |valid C++14 code when
   |"-std=c++11": in|compiling with
   |push_access_scope, at   |"-std=c++11": in
   |cp/pt.c:227 |push_access_scope, at
   ||cp/pt.c:227

--- Comment #2 from Jakub Jelinek  ---
Started with I think r198099 (r198096 with -std=c++0x just warns, r198101
already ICEs).

[Bug middle-end/77816] [7 Regression] lots of fortran tests fail on aarch64-linux-gnu

2016-10-03 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77816

--- Comment #7 from ktkachov at gcc dot gnu.org ---
(In reply to Bernd Edlinger from comment #6)
> (In reply to ktkachov from comment #4)
> > I can't reproduce the fortran failures with a clean trunk at r240705
> > configured with --enable-languages=c,c++,fortran --disable-bootstrap
> > --disable-werror --enable-plugins --enable-gnu-indirect-function
> > 
> > I don't have access to an environment that allows me to bootstrap Ada.
> > I'll revert the patch while I investigate
> 
> Kyrill,
> 
> this may have nothing to do with this,
> but I wonder if this is correct,
> to do the ~ and - in HOST_WIDE_INT
> instead of the target mode of the computation:
> 
> if (eq_side_val == ~cstval)
> op_code = NOT
> else if (eq_side_val != HOST_WIDE_INT_MIN && (cstval == -eq_side_val))
> op_code = NEG;
> 
> 
> Regarding the Ada, you can boot-strap Ada from a PC to your target.
> you first have to full bootstrap on a PC with working gcc/Ada,
> 
> then using that a cross with --target=aarch64...
> then using that a canadian-cross with --host=aarch64 --target=aarch64
> 
> the result should run on your target, and allow a full bootstrap
> with Ada.
> 
> I have done that for arm, but aarch64 should not be different.

Thanks for the advice Bernd

[Bug libfortran/77828] New: [7 Regression] Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes when containing write to string

2016-10-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77828

Bug ID: 77828
   Summary: [7 Regression] Linking gfortran-7 compiled program
with libgfortran of 5.x allowed but crashes when
containing write to string
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libfortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vehre at gcc dot gnu.org
  Target Milestone: ---

Created attachment 39737
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39737&action=edit
Standalone code as given in the description.

Compiling this example:

character(len=100) :: gr
integer :: i, j

i =42
j =43
write (gr,"(2(a,i2))") "Greetings from i ",i," of ", j
print *,gr

end

using latest gfortran but executing with a (system-provided) libgfortran from a
gcc 5.3.1 in the library search path leads to a segmentation fault on
Linux-x86_64/f23.

It looks like writing to the string corrupts the stack. Has something in the
handling of writing to the string changed, which corrupts the stack? When
linking with a gcc-7 libgfortran everything is fine. May be the libraries
should be made link-incompatible to prevent users searching this issue for
hours (like me) and quite early get a notion what might be the problem. Or is
this issue unintentional?

[Bug sanitizer/77827] New: tsan lacks support for 48 bit VMA on aarch64

2016-10-03 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77827

Bug ID: 77827
   Summary: tsan lacks support for 48 bit VMA on aarch64
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sch...@linux-m68k.org
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64-*-*

tsan_platform.h only has support for 39 and 42 bit VMA.

[Bug libfortran/77828] [7 Regression] Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes when containing write to string

2016-10-03 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77828

vehre at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug sanitizer/77827] tsan lacks support for 48 bit VMA on aarch64

2016-10-03 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77827

--- Comment #1 from Andrew Pinski  ---
I think the Sanitizers just need a merge.

[Bug preprocessor/77699] suspicious code in get_next_line

2016-10-03 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77699

--- Comment #1 from Bernd Edlinger  ---
Author: edlinger
Date: Mon Oct  3 14:05:46 2016
New Revision: 240713

URL: https://gcc.gnu.org/viewcvs?rev=240713&root=gcc&view=rev
Log:
2016-10-03  Bernd Edlinger  

PR preprocessor/77699
* input.c (maybe_grow): Don't allocate one byte extra headroom.
(get_next_line): Return false on error.
(read_next_line): Removed, use get_next_line instead.
(read_line_num): Don't copy the line.
(location_get_source_line): Don't use static data.
(selftest::test_reading_source_line): Add more test cases.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/input.c

[Bug target/77826] [7 Regression] ICE in decompose, at wide-int.h:928 w/ -m64 -O2 and above

2016-10-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77826

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-03
 CC||jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r240291.
I think the problem is either in the
/* (X | Y) ^ X -> Y & ~ X*/
(simplify
 (bit_xor:c (convert? (bit_ior:c @0 @1)) (convert? @0))
 (if (tree_nop_conversion_p (type, TREE_TYPE (@0)))
  (convert (bit_and @1 (bit_not @0)
simplifier or in the infrastructure.
  _3 = *v0_14(D);
  _4 = (long unsigned int) q2_11(D);
  _5 = _3 | _4;
  *v0_14(D) = _5;
  _7 = (unsigned int) _5;
  _9 = q2.0_1 ^ _7;
The xor is done in unsigned int type, while ior is done in unsigned long int
type, and evrp is trying to valueize q2_11(D) as 1.  As it is valueized as 1
and operand_equal_p is true for 1U and 1UL, we seem to end up with @0 being 1U
(rather than 1UL), while @1 is unsigned long variable.
--- match.pd.jj 2016-09-29 22:53:14.0 +0200
+++ match.pd2016-10-03 16:04:50.905185018 +0200
@@ -707,8 +707,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
 /* (X | Y) ^ X -> Y & ~ X*/
 (simplify
  (bit_xor:c (convert? (bit_ior:c @0 @1)) (convert? @0))
- (if (tree_nop_conversion_p (type, TREE_TYPE (@0)))
-  (convert (bit_and @1 (bit_not @0)
+ (if (tree_nop_conversion_p (type, TREE_TYPE (@1)))
+  (with { tree itype = TREE_TYPE (@1); }
+   (convert (bit_and @1 (bit_not (convert:itype @0)))

 /* Convert ~X ^ ~Y to X ^ Y.  */
 (simplify
fixes the ICE, but I'm not sure if it is the right fix.  Plus, there are
various other simplifications which use (convert? @[0-9]) together with the
same @[0-9] outside of the convert that could potentially have the same
problem.

[Bug libstdc++/68323] chrono reference to ‘literals’ namespace is ambiguous when using gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68323

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:35:28 2016
New Revision: 240714

URL: https://gcc.gnu.org/viewcvs?rev=240714&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/std/string_view: Likewise.
* include/std/variant: Likewise. Add workaround for PR c++/59256.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
trunk/libstdc++-v3/include/experimental/bits/lfts_config.h
  - copied, changed from r240711,
trunk/libstdc++-v3/include/experimental/bits/erase_if.h
trunk/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
trunk/libstdc++-v3/include/Makefile.am
trunk/libstdc++-v3/include/Makefile.in
trunk/libstdc++-v3/include/bits/basic_string.h
trunk/libstdc++-v3/include/bits/c++config
trunk/libstdc++-v3/include/bits/regex.h
trunk/libstdc++-v3/include/bits/uniform_int_dist.h
trunk/libstdc++-v3/include/experimental/algorithm
trunk/libstdc++-v3/include/experimental/any
trunk/libstdc++-v3/include/experimental/bits/erase_if.h
trunk/libstdc++-v3/include/experimental/bits/fs_fwd.h
trunk/libstdc++-v3/include/experimental/bits/string_view.tcc
trunk/libstdc++-v3/include/experimental/chrono
trunk/libstdc++-v3/include/experimental/functional
trunk/libstdc++-v3/include/experimental/memory_resource
trunk/libstdc++-v3/include/experimental/optional
trunk/libstdc++-v3/include/experimental/propagate_const
trunk/libstdc++-v3/include/experimental/random
trunk/libstdc++-v3/include/experimental/ratio
trunk/libstdc++-v3/include/experimental/string_view
trunk/libstdc++-v3/include/experimental/system_error
trunk/libstdc++-v3/include/experimental/tuple
trunk/libstdc++-v3/include/experimental/type_traits
trunk/libstdc++-v3/include/experimental/utility
trunk/libstdc++-v3/include/std/chrono
trunk/libstdc++-v3/include/std/complex
trunk/libstdc++-v3/include/std/string_view
trunk/libstdc++-v3/include/std/variant
trunk/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
trunk/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
   
trunk/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc
trunk/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc
trunk/libs

[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256

--- Comment #9 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:35:28 2016
New Revision: 240714

URL: https://gcc.gnu.org/viewcvs?rev=240714&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/std/string_view: Likewise.
* include/std/variant: Likewise. Add workaround for PR c++/59256.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
trunk/libstdc++-v3/include/experimental/bits/lfts_config.h
  - copied, changed from r240711,
trunk/libstdc++-v3/include/experimental/bits/erase_if.h
trunk/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
trunk/libstdc++-v3/include/Makefile.am
trunk/libstdc++-v3/include/Makefile.in
trunk/libstdc++-v3/include/bits/basic_string.h
trunk/libstdc++-v3/include/bits/c++config
trunk/libstdc++-v3/include/bits/regex.h
trunk/libstdc++-v3/include/bits/uniform_int_dist.h
trunk/libstdc++-v3/include/experimental/algorithm
trunk/libstdc++-v3/include/experimental/any
trunk/libstdc++-v3/include/experimental/bits/erase_if.h
trunk/libstdc++-v3/include/experimental/bits/fs_fwd.h
trunk/libstdc++-v3/include/experimental/bits/string_view.tcc
trunk/libstdc++-v3/include/experimental/chrono
trunk/libstdc++-v3/include/experimental/functional
trunk/libstdc++-v3/include/experimental/memory_resource
trunk/libstdc++-v3/include/experimental/optional
trunk/libstdc++-v3/include/experimental/propagate_const
trunk/libstdc++-v3/include/experimental/random
trunk/libstdc++-v3/include/experimental/ratio
trunk/libstdc++-v3/include/experimental/string_view
trunk/libstdc++-v3/include/experimental/system_error
trunk/libstdc++-v3/include/experimental/tuple
trunk/libstdc++-v3/include/experimental/type_traits
trunk/libstdc++-v3/include/experimental/utility
trunk/libstdc++-v3/include/std/chrono
trunk/libstdc++-v3/include/std/complex
trunk/libstdc++-v3/include/std/string_view
trunk/libstdc++-v3/include/std/variant
trunk/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
trunk/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
   
trunk/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc
trunk/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc
trunk/libs

[Bug libstdc++/68323] chrono reference to ‘literals’ namespace is ambiguous when using gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68323

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:36:22 2016
New Revision: 240719

URL: https://gcc.gnu.org/viewcvs?rev=240719&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/regex.h

[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256

--- Comment #10 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:36:22 2016
New Revision: 240719

URL: https://gcc.gnu.org/viewcvs?rev=240719&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/regex.h

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:36:22 2016
New Revision: 240719

URL: https://gcc.gnu.org/viewcvs?rev=240719&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
   
branches/gcc-6-branch/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/regex.h

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:35:28 2016
New Revision: 240714

URL: https://gcc.gnu.org/viewcvs?rev=240714&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/std/string_view: Likewise.
* include/std/variant: Likewise. Add workaround for PR c++/59256.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
trunk/libstdc++-v3/include/experimental/bits/lfts_config.h
  - copied, changed from r240711,
trunk/libstdc++-v3/include/experimental/bits/erase_if.h
trunk/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
trunk/libstdc++-v3/include/Makefile.am
trunk/libstdc++-v3/include/Makefile.in
trunk/libstdc++-v3/include/bits/basic_string.h
trunk/libstdc++-v3/include/bits/c++config
trunk/libstdc++-v3/include/bits/regex.h
trunk/libstdc++-v3/include/bits/uniform_int_dist.h
trunk/libstdc++-v3/include/experimental/algorithm
trunk/libstdc++-v3/include/experimental/any
trunk/libstdc++-v3/include/experimental/bits/erase_if.h
trunk/libstdc++-v3/include/experimental/bits/fs_fwd.h
trunk/libstdc++-v3/include/experimental/bits/string_view.tcc
trunk/libstdc++-v3/include/experimental/chrono
trunk/libstdc++-v3/include/experimental/functional
trunk/libstdc++-v3/include/experimental/memory_resource
trunk/libstdc++-v3/include/experimental/optional
trunk/libstdc++-v3/include/experimental/propagate_const
trunk/libstdc++-v3/include/experimental/random
trunk/libstdc++-v3/include/experimental/ratio
trunk/libstdc++-v3/include/experimental/string_view
trunk/libstdc++-v3/include/experimental/system_error
trunk/libstdc++-v3/include/experimental/tuple
trunk/libstdc++-v3/include/experimental/type_traits
trunk/libstdc++-v3/include/experimental/utility
trunk/libstdc++-v3/include/std/chrono
trunk/libstdc++-v3/include/std/complex
trunk/libstdc++-v3/include/std/string_view
trunk/libstdc++-v3/include/std/variant
trunk/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
trunk/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
   
trunk/libstdc++-v3/testsuite/experimental/propagate_const/assignment/move_neg.cc
trunk/libstdc++-v3/testsuite/experimental/propagate_const/cons/move_neg.cc
trunk/libs

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #4 from Jonathan Wakely  ---
Fixed for 5.5, 6.3 and 7.0

[Bug libstdc++/68323] chrono reference to ‘literals’ namespace is ambiguous when using gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68323

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:42:06 2016
New Revision: 240720

URL: https://gcc.gnu.org/viewcvs?rev=240720&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add export for
__cxa_thread_atexit.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Likewise.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/experimental/fs_fwd.h: Declare versioned namespace.
* include/experimental/lfts_config.h: Declare versioned namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/string_view.tcc: Reopen inline namespace for
non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
branches/gcc-5-branch/libstdc++-v3/include/experimental/lfts_config.h
  - copied, changed from r240693,
branches/gcc-5-branch/libstdc++-v3/include/experimental/chrono
   
branches/gcc-5-branch/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
   
branches/gcc-5-branch/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
branches/gcc-5-branch/libstdc++-v3/include/Makefile.am
branches/gcc-5-branch/libstdc++-v3/include/Makefile.in
branches/gcc-5-branch/libstdc++-v3/include/bits/basic_string.h
branches/gcc-5-branch/libstdc++-v3/include/bits/c++config
branches/gcc-5-branch/libstdc++-v3/include/bits/regex.h
branches/gcc-5-branch/libstdc++-v3/include/bits/uniform_int_dist.h
branches/gcc-5-branch/libstdc++-v3/include/experimental/algorithm
branches/gcc-5-branch/libstdc++-v3/include/experimental/any
branches/gcc-5-branch/libstdc++-v3/include/experimental/chrono
branches/gcc-5-branch/libstdc++-v3/include/experimental/fs_fwd.h
branches/gcc-5-branch/libstdc++-v3/include/experimental/functional
branches/gcc-5-branch/libstdc++-v3/include/experimental/optional
branches/gcc-5-branch/libstdc++-v3/include/experimental/ratio
branches/gcc-5-branch/libstdc++-v3/include/experimental/string_view
branches/gcc-5-branch/libstdc++-v3/include/experimental/string_view.tcc
branches/gcc-5-branch/libstdc++-v3/include/experimental/system_error
branches/gcc-5-branch/libstdc++-v3/include/experimental/tuple
branches/gcc-5-branch/libstdc++-v3/include/experimental/type_traits
branches/gcc-5-branch/libstdc++-v3/include/std/chrono
branches/gcc-5-branch/libstdc++-v3/include/std/complex
branches/gcc-5-branch/libstdc++-v3/src/filesystem/Makefile.in
   
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc

[Bug c++/59256] qualified name in friend function declaration doesn't match previous declaration in inline namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59256

--- Comment #11 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:42:06 2016
New Revision: 240720

URL: https://gcc.gnu.org/viewcvs?rev=240720&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add export for
__cxa_thread_atexit.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Likewise.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/experimental/fs_fwd.h: Declare versioned namespace.
* include/experimental/lfts_config.h: Declare versioned namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/string_view.tcc: Reopen inline namespace for
non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
branches/gcc-5-branch/libstdc++-v3/include/experimental/lfts_config.h
  - copied, changed from r240693,
branches/gcc-5-branch/libstdc++-v3/include/experimental/chrono
   
branches/gcc-5-branch/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
   
branches/gcc-5-branch/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
branches/gcc-5-branch/libstdc++-v3/include/Makefile.am
branches/gcc-5-branch/libstdc++-v3/include/Makefile.in
branches/gcc-5-branch/libstdc++-v3/include/bits/basic_string.h
branches/gcc-5-branch/libstdc++-v3/include/bits/c++config
branches/gcc-5-branch/libstdc++-v3/include/bits/regex.h
branches/gcc-5-branch/libstdc++-v3/include/bits/uniform_int_dist.h
branches/gcc-5-branch/libstdc++-v3/include/experimental/algorithm
branches/gcc-5-branch/libstdc++-v3/include/experimental/any
branches/gcc-5-branch/libstdc++-v3/include/experimental/chrono
branches/gcc-5-branch/libstdc++-v3/include/experimental/fs_fwd.h
branches/gcc-5-branch/libstdc++-v3/include/experimental/functional
branches/gcc-5-branch/libstdc++-v3/include/experimental/optional
branches/gcc-5-branch/libstdc++-v3/include/experimental/ratio
branches/gcc-5-branch/libstdc++-v3/include/experimental/string_view
branches/gcc-5-branch/libstdc++-v3/include/experimental/string_view.tcc
branches/gcc-5-branch/libstdc++-v3/include/experimental/system_error
branches/gcc-5-branch/libstdc++-v3/include/experimental/tuple
branches/gcc-5-branch/libstdc++-v3/include/experimental/type_traits
branches/gcc-5-branch/libstdc++-v3/include/std/chrono
branches/gcc-5-branch/libstdc++-v3/include/std/complex
branches/gcc-5-branch/libstdc++-v3/src/filesystem/Makefile.in
   
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Mon Oct  3 14:42:06 2016
New Revision: 240720

URL: https://gcc.gnu.org/viewcvs?rev=240720&root=gcc&view=rev
Log:
Fix libstdc++ versioned namespace build

PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add export for
__cxa_thread_atexit.
* include/Makefile.am: Add 
* include/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Likewise.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/experimental/fs_fwd.h: Declare versioned namespace.
* include/experimental/lfts_config.h: Declare versioned namespaces.
* include/experimental/algorithm: Include
.
* include/experimental/any: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/string_view.tcc: Reopen inline namespace for
non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

Added:
branches/gcc-5-branch/libstdc++-v3/include/experimental/lfts_config.h
  - copied, changed from r240693,
branches/gcc-5-branch/libstdc++-v3/include/experimental/chrono
   
branches/gcc-5-branch/libstdc++-v3/testsuite/17_intro/using_namespace_std_exp_neg.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
   
branches/gcc-5-branch/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
branches/gcc-5-branch/libstdc++-v3/include/Makefile.am
branches/gcc-5-branch/libstdc++-v3/include/Makefile.in
branches/gcc-5-branch/libstdc++-v3/include/bits/basic_string.h
branches/gcc-5-branch/libstdc++-v3/include/bits/c++config
branches/gcc-5-branch/libstdc++-v3/include/bits/regex.h
branches/gcc-5-branch/libstdc++-v3/include/bits/uniform_int_dist.h
branches/gcc-5-branch/libstdc++-v3/include/experimental/algorithm
branches/gcc-5-branch/libstdc++-v3/include/experimental/any
branches/gcc-5-branch/libstdc++-v3/include/experimental/chrono
branches/gcc-5-branch/libstdc++-v3/include/experimental/fs_fwd.h
branches/gcc-5-branch/libstdc++-v3/include/experimental/functional
branches/gcc-5-branch/libstdc++-v3/include/experimental/optional
branches/gcc-5-branch/libstdc++-v3/include/experimental/ratio
branches/gcc-5-branch/libstdc++-v3/include/experimental/string_view
branches/gcc-5-branch/libstdc++-v3/include/experimental/string_view.tcc
branches/gcc-5-branch/libstdc++-v3/include/experimental/system_error
branches/gcc-5-branch/libstdc++-v3/include/experimental/tuple
branches/gcc-5-branch/libstdc++-v3/include/experimental/type_traits
branches/gcc-5-branch/libstdc++-v3/include/std/chrono
branches/gcc-5-branch/libstdc++-v3/include/std/complex
branches/gcc-5-branch/libstdc++-v3/src/filesystem/Makefile.in
   
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/duration/literals/range.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/experimental/any/misc/any_cast_neg.cc
   
branches/gcc-5-branch/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc

[Bug libstdc++/68323] chrono reference to ‘literals’ namespace is ambiguous when using gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68323

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #6 from Jonathan Wakely  ---
Fixed for 5.5, 6.3 and 7.0

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread jordi at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

--- Comment #4 from Jordi Mallach  ---
(In reply to ktkachov from comment #3)
> I can't compile this:
> fatal error: ./obj/Release/emu.h.gch: couldn't open PCH file: No such file
> or directory

I am unsure why you're not getting it generated. If it helps, it is attached.

[Bug bootstrap/32497] Crosscomiling native sh3 gcc on a 64-bit host fails

2016-10-03 Thread uwe at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32497

--- Comment #6 from Valeriy E. Ushakov  ---
(In reply to Oleg Endo from comment #5)
> (In reply to Valeriy E. Ushakov from comment #4)
> 
> > GEN_INT (-4294967296L;
> 
> > GEN_INT (4294967295L)),
> 
> I think those should be -4294967296LL and 4294967295LL.

Right, with the patch above (committed in NetBSD) I get the following diff
between insn-emit.c:

-   GEN_INT (-4294967296L;
+   GEN_INT (HOST_WIDE_INT_CONSTANT (-4294967296);

... etc

so, effectively, it removes the L/LL decision from genemit.c and delays it
until insn-emit.c is compiled.


> Do you have that build setup at hand to try this out?

I guess the easiest way to get out NetBSD source tree and to cross-build say
NetBSD/landisk on a 64 bit host (any linux/amd64 will do, osx probably too, but
there were a couple of pitfalls recently).

You can grab sources from e.g.
http://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0.1/source/sets/ and consult
BUILDING, but in a nutshell something like

./build.sh -m landisk -j8 -u -U distribution

(where -j8 is the amount of parallel jobs you want).
You can mail me privately if you need any help with this.


> BTW, those two patterns do not exist anymore in trunk, as SH5 stuff has been
> removed.

Yes, but that just masks the bug that L/LL selection is done in wrong context.

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread jordi at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

--- Comment #6 from Jordi Mallach  ---
emu.h.gch can be found here due to being > 1000KB:

http://oskuro.net/emu.h.gch.gz

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread jordi at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

--- Comment #5 from Jordi Mallach  ---
Created attachment 39738
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39738&action=edit
emu.h.d for the failed tree

[Bug c/77817] -Wimplicit-fallthrough: cpp directive renders FALLTHRU comment ineffective

2016-10-03 Thread jim at meyering dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817

--- Comment #2 from jim at meyering dot net ---
Oops. That must have been the "worked-around" version.
Swap the #undef and fallthrough comment to repro:

int
foo (int x)
{
  switch (x)
{
case 1:
  x = 3;
  /* fallthrough */
#undef X
case 2:
  x = 4;
}
  return x;
}

$ /p/p/gcc-2016-10-02.12h48/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/cc1
-Wimplicit-fallthrough /t/ft.c
 foo
Analyzing compilation unit

/t/ft.c: In function ‘foo’:
/t/ft.c:20:9: warning: this statement may fall through [-Wimplicit-fallthroug ]
   x = 3;
   ~~^~~
/t/ft.c:23:5: note: here
 case 2:
 ^~~~

[Bug target/77586] [7 Regression] ia64 target fails to build due to ICE triggered by -fself-test

2016-10-03 Thread tbsaunde at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77586

tbsaunde at gcc dot gnu.org changed:

   What|Removed |Added

 CC||tbsaunde at gcc dot gnu.org

--- Comment #2 from tbsaunde at gcc dot gnu.org ---
(In reply to jos...@codesourcery.com from comment #1)
> My offer at  to 
> provide an untested patch to always enable TFmode support in libgcc on 
> ia64, if such an untested patch would be useful, stands.

I think it would be useful for these targets to at least build in
config-list.mk runs so the failure of each doesn't need to be manually checked.

As for the vms targets there is at least an argument to be made that a
configuration that builds but is not safe is less broken than a configuration
that doesn't build at all.  That said if nobody cares about vms ia64 can we
just obsolete it?

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

Jonathan Wakely  changed:

   What|Removed |Added

 CC||dmorilha at gmail dot com

--- Comment #6 from Jonathan Wakely  ---
*** Bug 68058 has been marked as a duplicate of this bug. ***

[Bug libstdc++/68058] _GLIBCXX_BEGIN_NAMESPACE_VERSION breaks regex

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68058

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE
   Target Milestone|--- |5.5

--- Comment #2 from Jonathan Wakely  ---
This is due to PR 59256, but is now fixed by the changes for PR 77794.

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

[Bug libstdc++/23888] should debug mode throw instead of assert?

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23888

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Jonathan Wakely  ---
(In reply to Sylvain Pion from comment #5)
> What about providing both modes, with for example a global run-time flag to
> select the mode which is the most appropriate ?  And maybe defaulting to
> assert, since it looks like users might prefer this (?).

That just seems like unnecessary complexity.

I'm going to close this. I don't find the benefits of this change compelling.


> Also, a side note : throwing an uncaught exception does not seem to destroy
> the stack,

It does if it is caught and rethrown:

void f() { throw 1; }

int main() {
  try {
f();
  } catch (...) {
throw;
  }
}

The context of the original throw is lost.

Also, the prevalence of 'noexcept' in the std::lib in modern C++ makes it more
likely that an exception will terminate, so we'd just abort() again anyway.

[Bug libstdc++/77342] Use abi_tag on Debug Mode namespace

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77342

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-03
 Ever confirmed|0   |1

[Bug libgcj/19612] gjdoc in libgcj

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19612

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |FIXED

--- Comment #5 from Andrew John Hughes  ---
gjdoc was actually added into GNU Classpath in 0.98 so will have been in gcj
for some time.

$ jar tf
/usr/share/gcc-data/x86_64-pc-linux-gnu/5.3.0/java/libgcj-tools-5.3.0.jar |grep
gjdoc/|head
gnu/classpath/tools/gjdoc/
gnu/classpath/tools/gjdoc/SourcePositionImpl.class
etc.

[Bug c++/77822] [6 REGRESSION] arm64 Error: immediate value out of range 0 to 63 at operand 3

2016-10-03 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77822

--- Comment #7 from ktkachov at gcc dot gnu.org ---
:1:39: warning: emu.h.gch: created by a different GCC executable
:1:9: fatal error: emu.h.gch: PCH file was invalid

Is there any way you can get a pre-processed source without any precompiled
headers involved?

[Bug libgcj/20395] GNU Crypto should be merged into libgcj

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20395

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |FIXED

--- Comment #3 from Andrew John Hughes  ---
Merged into GNU Classpath for 0.90 (2006-03-06).

[Bug c++/77829] Bad fix-it for nested-name-specifier

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77829

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-03
Version|6.2.1   |7.0
 Ever confirmed|0   |1

[Bug c++/77829] New: Bad fix-it for nested-name-specifier

2016-10-03 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77829

Bug ID: 77829
   Summary: Bad fix-it for nested-name-specifier
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

namespace detail {
  int _foo(int i) { return i; }
}

void bar(int i) {
  detail::foo(i);
}

This says:

fixit.cc: In function ‘void bar(int)’:
fixit.cc:6:3: error: ‘foo’ is not a member of ‘detail’
   detail::foo(i);
   ^~
fixit.cc:6:3: note: suggested alternative: ‘bool’
   detail::foo(i);
   ^~
   bool


There are two problems here. Firstly, the range info for the rich location
suggests replacing "detail" when it should be "foo". The patch generated by
-fdiagnostics-generate-patch is:

--- fixit.cc
+++ fixit.cc
@@ -3,5 +3,5 @@
 }

 void bar(int i) {
-  detail::foo(i);
+  bool::foo(i);
 }


Secondly, detail::_foo should be a better match for detail::foo than
detail::bool (which wouldn't be valid, because bool is not an identifier).

[Bug middle-end/64516] [5 Regression] arm: wrong unaligned load generated

2016-10-03 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64516

--- Comment #12 from rguenther at suse dot de  ---
On October 3, 2016 12:21:13 PM GMT+02:00, markus at oberhumer dot com
 wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64516
>
>--- Comment #11 from Markus F.X.J. Oberhumer com> ---
>Did you have a chance to backport this for 5.5 yet ?

Not yet, I tried but the patch didn't trivially apply.

>Thanks,
>Markus

[Bug fortran/77371] [6/7 Regression] ICE in force_constant_size, at gimplify.c:671 (... and others)

2016-10-03 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77371

Thomas Schwinge  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #5 from Thomas Schwinge  ---
.

[Bug libgcj/43258] In-tree build may fail in libjava/classpath/tools

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43258

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |FIXED

--- Comment #2 from Andrew John Hughes  ---
Seems to have been fixed by this:

commit 0e24d2cf64e4384186a0b11489c139e645fd6743
Author: Andrew John Hughes 
Date:   Sat Jan 30 02:33:50 2010 +

Remove .svn pruning.  Now applied to GCJ local copies only.

2010-01-15  Rainer Orth  

PR libgcj/38251
* tools/Makefile.am (dist-hook): Prune .svn directories in asm and
classes copies.

Revert:
2008-11-05  Andrew Haley  

* tools/Makefile.am (UPDATE_TOOLS_ZIP, CREATE_TOOLS_ZIP): Exclude
.svn directories.

http://git.savannah.gnu.org/cgit/classpath.git/commit/?id=0e24d2cf64e4384186a0b11489c139e645

[Bug middle-end/77816] [7 Regression] lots of fortran tests fail on aarch64-linux-gnu

2016-10-03 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77816

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Andrew Pinski  ---
(In reply to ktkachov from comment #5)
> I reverted r240649. Can you please confirm that it fixes your issues and
> close this if appropriate?

Yes it fixes my issue:
https://gcc.gnu.org/ml/gcc-testresults/2016-10/msg00187.html

[Bug libfortran/77828] [7 Regression] Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes when containing write to string

2016-10-03 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77828

Jerry DeLisle  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-10-03
 CC||jvdelisle at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jerry DeLisle  ---
(In reply to vehre from comment #0)
> Created attachment 39737 [details]
> Standalone code as given in the description.
> 
> Compiling this example:
> 
> character(len=100) :: gr
> integer :: i, j
> 
> i =42
> j =43
> write (gr,"(2(a,i2))") "Greetings from i ",i," of ", j
> print *,gr
> 

I am pretty sure this is related to the dtio internal units patch. I think I
need to bump the symbol versions for the basic read and write statements, the
changes to internal units was fairly intrusive.

So this one is mine. Thanks for report.

[Bug classpath/39481] StringTokenizer.hasMoreTokens() can screw up tokens

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39481

Andrew John Hughes  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
Version|4.4.0   |unspecified
   Last reconfirmed||2016-10-03
 CC||gnu_andrew at member dot 
fsf.org
  Component|libgcj  |classpath
 Resolution|WONTFIX |---
 Ever confirmed|0   |1
Product|gcc |classpath

--- Comment #3 from Andrew John Hughes  ---
Replicated with CACAO+GNu Classpath so re-opening as a GNU Classpath bug.

[Bug libstdc++/77814] build fails trying to build eh_arm

2016-10-03 Thread tprince at computer dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77814

--- Comment #6 from tprince at computer dot org ---
Permits bootstrap to proceed, will post to testresults when successful. 
Thanks.

[Bug classpath/13459] use freedesktop mime type library

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13459

Andrew John Hughes  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
Version|unknown |unspecified
  Component|libgcj  |classpath
 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |---
Product|gcc |classpath

--- Comment #3 from Andrew John Hughes  ---
Re-assigning to GNU Classpath.

[Bug libgcj/28977] UTF-16 endianness differs between gcj and Sun JDK

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28977

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org

--- Comment #6 from Andrew John Hughes  ---
Seems to have been specific to libgcj:

out.cacao:Big-endian UTF-16 Unicode text, with no line terminators
out.gij:  Little-endian UTF-16 Unicode text, with no line terminators
out.icedtea6: Big-endian UTF-16 Unicode text, with no line terminators

[Bug classpath/20508] gij prints too much information if an incorrect class is given

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20508

Andrew John Hughes  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
Version|4.1.0   |unspecified
  Component|libgcj  |classpath
 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |---
Product|gcc |classpath

--- Comment #4 from Andrew John Hughes  ---
Seems to be a Classpath bug:

$ cacao Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test not found in
java.lang.ClassLoader$1{urls=[file:/home/andrew/projects/classpath/tests/pr28977/./],
parent=null}
   <>
Caused by: java.lang.ClassNotFoundException: Test not found in
java.lang.ClassLoader$1{urls=[file:/home/andrew/projects/classpath/tests/pr28977/./],
parent=null}
   at java.net.URLClassLoader.findClass(URLClassLoader.java:531)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:341)
   at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:293)

$ gij Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test
   at gnu.java.lang.MainThread.run(libgcj.so.17)
Caused by: java.lang.ClassNotFoundException: Test not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.17)
   at java.lang.ClassLoader.loadClass(libgcj.so.17)
   at java.lang.ClassLoader.loadClass(libgcj.so.17)
   at gnu.java.lang.MainThread.run(libgcj.so.17)

[Bug c++/77830] New: internal compiler error: in output_constructor_regular_field, at varasm.c:4968, when using constexpr (with testcase)

2016-10-03 Thread asad78611 at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77830

Bug ID: 77830
   Summary: internal compiler error: in
output_constructor_regular_field, at varasm.c:4968,
when using constexpr (with testcase)
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asad78611 at googlemail dot com
  Target Milestone: ---

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

running 

c++ -g -std=gnu++14 test.cpp

doesn't compile with:

test.cpp:36:1: internal compiler error: in output_constructor_regular_field, at
varasm.c:4968
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.



removing constexpr on line 35 compiles successfully, but doesn't run the
constant expression.

c++ -v:

COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release
Thread model: posix
gcc version 6.2.1 20160830 (GCC)

[Bug libgcj/13603] [meta-bug] Java security model tracking PR

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13603
Bug 13603 depends on bug 21890, which changed state.

Bug 21890 Summary: SecurityManager is incomplete
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21890

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
 Resolution|WONTFIX |---

[Bug classpath/21890] SecurityManager is incomplete

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21890

Andrew John Hughes  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
Version|4.1.0   |unspecified
  Component|libgcj  |classpath
 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |---
Product|gcc |classpath

[Bug c++/77830] internal compiler error: in output_constructor_regular_field, at varasm.c:4968, when using constexpr (with testcase)

2016-10-03 Thread asad78611 at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77830

Asad Mehmood  changed:

   What|Removed |Added

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

--- Comment #1 from Asad Mehmood  ---
Never mind,

Incorrect source

clang gives a more informative error:

test.cpp:35:18: error: constexpr variable 'a' must be initialized by a constant
expression
  constexpr auto a = create_parser("A","B","C");
 ^   ~~
test.cpp:20:23: note: assignment to dereferenced one-past-the-end pointer is
not allowed in a constant expression
  this->arr[i][j] = 0;
  ^
test.cpp:29:7: note: in call to '&p->setMember(&"A"[0], 0)'
p.setMember(strings[i], i);
  ^
test.cpp:35:22: note: in call to 'create_parser(&"A"[0], &"B"[0], &"C"[0])'
  constexpr auto a = create_parser("A","B","C");
 ^
1 error generated.

error was on line 13: should have been j < 11.

[Bug classpath/21890] SecurityManager is incomplete

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21890

--- Comment #3 from Andrew John Hughes  ---
Moved to GNU Classpath.

[Bug java/32904] Typo in Base64.java's decode function

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32904

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org
 Resolution|WONTFIX |FIXED

--- Comment #3 from Andrew John Hughes  ---
Base64 implementation is now gnu/java/util/Base64.java without this mistake in
both Classpath and gcj.

[Bug libgcj/34313] SSLEngine for NIO - socket connection not working

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34313

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org

--- Comment #3 from Andrew John Hughes  ---
No reproducer.

[Bug java/20469] gcjh does not rename Java variables named NULL

2016-10-03 Thread gnu_andrew at member dot fsf.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20469

Andrew John Hughes  changed:

   What|Removed |Added

 CC||gnu_andrew at member dot 
fsf.org

--- Comment #3 from Andrew John Hughes  ---
Created attachment 39740
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39740&action=edit
Simple reproducer

[Bug c/77690] -Wformat-length %s false positive after strlen check

2016-10-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77690

Martin Sebor  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=77708
 Resolution|FIXED   |INVALID

[Bug middle-end/77831] New: add fixit hints to -Wformat-length

2016-10-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77831

Bug ID: 77831
   Summary: add fixit hints to -Wformat-length
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

Bug 77743 (resolved as invalid) complains about -Wformat-length warning for a
safe call to sprintf(d, "%o", x & 0xff).  Bug 77690 (also resolved as invalid)
complains about a warning in a similarly safe sprintf(d, "%s", s) call where
the %s argument is guaranteed to fit in the destination.  Neither of these
false positives can be fixed in the gimple-ssa-sprintf pass that implements the
warning and so both of the warnings need to be suppressed in user code.  The
solution (using a length modifier in the first case and precision in the
second), although documented in the manual, is not obvious.  It would help if
GCC suggested the solution via a fixit hint.

[Bug c++/77832] New: isnan() check causes signal 8 with signaling nans

2016-10-03 Thread gmc at synopsys dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77832

Bug ID: 77832
   Summary: isnan() check causes signal 8 with signaling nans
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gmc at synopsys dot com
  Target Milestone: ---

Created attachment 39741
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39741&action=edit
test program

The example prog shows incorrect isnan() behavior when used with signaling
NaNs. (isnan() itself should not generate a signal AFAIK)

Run the test prog is run with a SINGLE argument(0 => use quiet Nan ; 1 => use
signaling Nan):
 - quite NaNs behave as expected
 - for signaling NaNs:
 - the optimized exe behaves correctly and does NOT trigger a signal
 - the debug exe gets signal 8 on the isnan()

If you then run the exact same program with an additional arg (any old value)
then the optimized exe will now ALSO trigger a signal on isnan() .

Attachment 'run' runs the test prog in each of these variants - none are
expected to signal.

OS: RedHat 6.6
Works with GCC version 5.4 
Does not work on GCC versions 6.1 and 6.
Compiler is built as follows:
$ g++ -v
Using built-in specs.
COLLECT_GCC=/remote/sweifs/PST/gmc/Gnu/GCC_6.2.0/bin/g++
COLLECT_LTO_WRAPPER=/remote/sweifs/PST/gmc/Gnu/GCC_6.2.0/libexec/gcc/x86_64-redhat-linux/6.2.0/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../src/gcc-6.2.0/configure
--prefix=/remote/sweifs/PST/gmc/Gnu/GCC_6.2.0 --enable-bootstrap
--enable-threads=posix --disable-checking --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-languages=c,c++,fortran --disable-libgcj --with-cpu=generic
--build=x86_64-redhat-linux
Thread model: posix
gcc version 6.2.0 (GCC)

[Bug c++/77832] isnan() check causes signal 8 with signaling nans

2016-10-03 Thread gmc at synopsys dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77832

--- Comment #1 from Gordon Mc  ---
Created attachment 39742
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39742&action=edit
Makefile

[Bug c++/77832] isnan() check causes signal 8 with signaling nans

2016-10-03 Thread gmc at synopsys dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77832

--- Comment #2 from Gordon Mc  ---
Created attachment 39743
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39743&action=edit
Runs the test prog with various arguments

[Bug go/77809] [7 regression] "_LITTLE_ENDIAN" redefined

2016-10-03 Thread ian at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77809

--- Comment #5 from ian at gcc dot gnu.org  ---
Author: ian
Date: Mon Oct  3 18:39:54 2016
New Revision: 240724

URL: https://gcc.gnu.org/viewcvs?rev=240724&root=gcc&view=rev
Log:
PR go/77809

libgo: strip most C macros from runtime.inc

The Go runtime package is picking up C macros from runtime_sysinfo.go
and then re-exporting them to runtime.inc.  This can cause name
conflicts.  Change the Makefile so that we only put the macros we need
into runtime.inc.  These are the constants that are actually defined by
Go code, not runtime_sysinfo.go.  There are only a few, so we can
pattern match.

This is an additional hack on runtime.inc.  The long term goal is to
convert the runtime package to Go and eliminate runtime.inc entirely, so
a few hacks seem acceptable.

Fixes GCC PR 77809.

Reviewed-on: https://go-review.googlesource.com/30167

Modified:
trunk/gcc/go/gofrontend/MERGE
trunk/libgo/Makefile.am
trunk/libgo/Makefile.in

[Bug go/77809] [7 regression] "_LITTLE_ENDIAN" redefined

2016-10-03 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77809

Ian Lance Taylor  changed:

   What|Removed |Added

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

--- Comment #6 from Ian Lance Taylor  ---
Should be fixed.

[Bug target/77833] New: [7 Regression] ICE: in plus_constant, at explow.c:87 with -O -mavx512f

2016-10-03 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77833

Bug ID: 77833
   Summary: [7 Regression] ICE: in plus_constant, at explow.c:87
with -O -mavx512f
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  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: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -mavx512f testcase.c 
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: in plus_constant, at explow.c:87
 }
 ^
0x8438ef plus_constant(machine_mode, rtx_def*, long, bool)
/repo/gcc-trunk/gcc/explow.c:87
0x8436a6 plus_constant(machine_mode, rtx_def*, long, bool)
/repo/gcc-trunk/gcc/explow.c:117
0x6f9a04 init_alias_analysis()
/repo/gcc-trunk/gcc/alias.c:3359
0x9dbe52 ira
/repo/gcc-trunk/gcc/ira.c:5160
0x9dbe52 execute
/repo/gcc-trunk/gcc/ira.c:5512
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


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

[Bug testsuite/72850] [7 Regression] FAIL: gcc.dg/tree-ssa/pr69270-3.c scan-tree-dump-times uncprop1 ", 1" 4

2016-10-03 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72850

Doug Gilmore  changed:

   What|Removed |Added

 CC||doug.gilmore at imgtec dot com

--- Comment #5 from Doug Gilmore  ---
Thanks Uri for the test case!

In case it wasn't clear, the switch statement should be removed at higher
levels
of optimization:

$ for i in 0 1 2 3 ; do ( set -x ; mips-mti-linux-gnu-gcc test.c -c -O$i
-fdump-tree-optimized ; egrep ";; Function|switch" test.c.169t.optimized  )
done
+ mips-mti-linux-gnu-gcc test.c -c -O0 -fdump-tree-optimized
+ egrep ';; Function|switch' test.c.169t.optimized
;; Function is_digit (is_digit, funcdef_no=0, decl_uid=1406, symbol_order=0)
;; Function FMS (FMS, funcdef_no=1, decl_uid=1410, symbol_order=1)
  switch (state_11) , case 0: , case 2: , case 3:
, case 4: , case 5: , case 6: , case 7: >
+ mips-mti-linux-gnu-gcc test.c -c -O1 -fdump-tree-optimized
+ egrep ';; Function|switch' test.c.169t.optimized
;; Function FMS (FMS, funcdef_no=1, decl_uid=1410, symbol_order=1)
  switch (state_98) , case 0: , case 2: , case 3:
, case 4: , case 5: , case 6: , case 7: >
+ mips-mti-linux-gnu-gcc test.c -c -O2 -fdump-tree-optimized
+ egrep ';; Function|switch' test.c.169t.optimized
;; Function FMS (FMS, funcdef_no=1, decl_uid=1410, symbol_order=1)
+ mips-mti-linux-gnu-gcc test.c -c -O3 -fdump-tree-optimized
+ egrep ';; Function|switch' test.c.169t.optimized
;; Function FMS (FMS, funcdef_no=1, decl_uid=1410, symbol_order=1)

[Bug target/77834] New: [7 Regression] ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstringop-strategy=libcall

2016-10-03 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77834

Bug ID: 77834
   Summary: [7 Regression] ICE: in make_decl_rtl, at varasm.c:1311
with -O -ftree-pre -mstringop-strategy=libcall
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  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: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -ftree-pre -mstringop-strategy=libcall testcase.c
-Wno-psabi
testcase.c: In function 'foo':
testcase.c:12:1: internal compiler error: in make_decl_rtl, at varasm.c:1311
 }
 ^
0xed8c18 make_decl_rtl(tree_node*)
/repo/gcc-trunk/gcc/varasm.c:1307
0x6f7020 nonoverlapping_memrefs_p(rtx_def const*, rtx_def const*, bool)
/repo/gcc-trunk/gcc/alias.c:2757
0x6f80e5 write_dependence_p
/repo/gcc-trunk/gcc/alias.c:3033
0x6f846f canon_anti_dependence(rtx_def const*, bool, rtx_def const*,
machine_mode, rtx_def*)
/repo/gcc-trunk/gcc/alias.c:3060
0x7978c5 cselib_invalidate_mem
/repo/gcc-trunk/gcc/cselib.c:2265
0x799a7b cselib_record_sets
/repo/gcc-trunk/gcc/cselib.c:2557
0x79abf6 cselib_process_insn(rtx_insn*)
/repo/gcc-trunk/gcc/cselib.c:2671
0xae9247 reload_cse_regs_1
/repo/gcc-trunk/gcc/postreload.c:217
0xaebfbd reload_cse_regs
/repo/gcc-trunk/gcc/postreload.c:67
0xaebfbd execute
/repo/gcc-trunk/gcc/postreload.c:2342
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


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

[Bug tree-optimization/71403] [7 Regression] wrong code (segfault) at -O3 on x86_64-linux-gnu

2016-10-03 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71403

--- Comment #12 from Jeffrey A. Law  ---
Author: law
Date: Mon Oct  3 19:28:24 2016
New Revision: 240727

URL: https://gcc.gnu.org/viewcvs?rev=240727&root=gcc&view=rev
Log:
PR tree-optimization/71550
PR tree-optimization/71403
* tree-ssa-threadbackward.c: Include tree-vectorizer.h
(profitable_jump_thread_path): Also return boolean indicating if
the realized path will create an irreducible loop.
Remove loop depth tests from 71403.
(fsm_find_control_statement_thread_paths): Remove loop depth tests
from 71403.  If threading will create an irreducible loop, then
throw away loop iteration and related information.

PR tree-optimization/71550
PR tree-optimization/71403
* gcc.c-torture/execute/pr71550.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr71550.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-threadbackward.c

[Bug tree-optimization/71550] [7 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-10-03 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71550

--- Comment #5 from Jeffrey A. Law  ---
Author: law
Date: Mon Oct  3 19:28:24 2016
New Revision: 240727

URL: https://gcc.gnu.org/viewcvs?rev=240727&root=gcc&view=rev
Log:
PR tree-optimization/71550
PR tree-optimization/71403
* tree-ssa-threadbackward.c: Include tree-vectorizer.h
(profitable_jump_thread_path): Also return boolean indicating if
the realized path will create an irreducible loop.
Remove loop depth tests from 71403.
(fsm_find_control_statement_thread_paths): Remove loop depth tests
from 71403.  If threading will create an irreducible loop, then
throw away loop iteration and related information.

PR tree-optimization/71550
PR tree-optimization/71403
* gcc.c-torture/execute/pr71550.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr71550.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-threadbackward.c

[Bug tree-optimization/71550] [7 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-10-03 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71550

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #6 from Jeffrey A. Law  ---
Fixed on the trunk.

[Bug tree-optimization/77399] Poor code generation for vector casts and loads

2016-10-03 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77399

--- Comment #13 from Andreas Schwab  ---
Executing on host: /daten/gcc/gcc-20161002/Build/gcc/xgcc
-B/daten/gcc/gcc-20161002/Build/gcc/
/daten/gcc/gcc-20161002/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c  -m32   
-fno-diagnostics-show-caret -fdiagnostics-color=never   -O -fdump-tree-cddce1
-S -o forwprop-35.s(timeout = 300)
spawn -ignore SIGHUP /daten/gcc/gcc-20161002/Build/gcc/xgcc
-B/daten/gcc/gcc-20161002/Build/gcc/
/daten/gcc/gcc-20161002/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c -m32
-fno-diagnostics-show-caret -fdiagnostics-color=never -O -fdump-tree-cddce1 -S
-o forwprop-35.s
/daten/gcc/gcc-20161002/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c: In
function 'vec_cast':
/daten/gcc/gcc-20161002/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c:8:1:
warning: GCC vector returned by reference: non-standard ABI extension with no
compatibility guarantee
/daten/gcc/gcc-20161002/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c:7:6:
warning: GCC vector passed by reference: non-standard ABI extension with no
compatibility guarantee
/daten/gcc/gcc-20161002/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c:9:10:
internal compiler error: in expand_float, at optabs.c:4774
0x10626e03 expand_float(rtx_def*, rtx_def*, int)
../../gcc/optabs.c:4774
0x1041851b expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
../../gcc/expr.c:8867
0x10407f77 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:9720
0x10412a53 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
../../gcc/expr.c:5547
0x10413897 expand_assignment(tree_node*, tree_node*, bool)
../../gcc/expr.c:5316
0x102e2793 expand_gimple_stmt_1
../../gcc/cfgexpand.c:3649
0x102e2793 expand_gimple_stmt
../../gcc/cfgexpand.c:3745
0x102e4287 expand_gimple_basic_block
../../gcc/cfgexpand.c:5752
0x102ead07 execute
../../gcc/cfgexpand.c:6363
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: gcc.dg/tree-ssa/forwprop-35.c (internal compiler error)

  1   2   >