[Bug c++/72752] internal compiler error: in retrieve_specialization

2016-07-31 Thread mikeus at hotmail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752

--- Comment #1 from Michael  ---
When it is explicitly specified to use a default template argument the code is
compiled successfully:
- 8< -- 8< -- 8< -
typedef void (*foo_t)();

void test(foo_t)
{}

template< typename >
struct A
{
  template< typename = void > static void foo();

  void bar()
  {
test(foo<>);
  }

  template< typename >
  void baz()
  {
test(foo<>);
  }
};

template< typename _T_ >
template< typename >
void A< _T_ >::foo()
{}
- >8 -- >8 -- >8 -

Here is a variation for one more test case:
ICE generated:
- 8< -- 8< -- 8< -

typedef void (*foo_t)();

void test(foo_t, foo_t)
{}

template< typename >
struct A
{
  template< typename = void > static void foo1();
  template< typename = void > static void foo2();

  void bar()
  {
test(foo1, foo2);
  }

  template< typename >
  void baz()
  {
test(foo1, foo2);
  }
};

template< typename _T_ >
template< typename >
void A< _T_ >::foo1()
{}

template< typename _T_ >
template< typename >
void A< _T_ >::foo2()
{}
- >8 -- >8 -- >8 -

Successfully passed:
- 8< -- 8< -- 8< -

typedef void (*foo_t)();

void test(foo_t, foo_t)
{}

template< typename >
struct A
{
  template< typename = void > static void foo1();
  template< typename = void > static void foo2();

  void bar()
  {
test(foo1, foo2<>);
  }

  template< typename >
  void baz()
  {
test(foo1<>, foo2);
  }
};

template< typename _T_ >
template< typename >
void A< _T_ >::foo1()
{}

template< typename _T_ >
template< typename >
void A< _T_ >::foo2()
{}
- >8 -- >8 -- >8 -

[Bug c++/72752] [6 Regression] ICE: in retrieve_specialization, at cp/pt.c:1183

2016-07-31 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||5.3.0, 7.0
   Keywords||ice-on-valid-code
   Last reconfirmed||2016-07-31
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|internal compiler error: in |[6 Regression] ICE: in
   |retrieve_specialization |retrieve_specialization, at
   ||cp/pt.c:1183
   Target Milestone|--- |6.2
  Known to fail||6.1.1

--- Comment #2 from Markus Trippelsdorf  ---
Confirmed for the very first testcase.
Only happens for gcc-6.

The other testcases are all ICEs on invalid.

[Bug c++/72752] [6 Regression] ICE: in retrieve_specialization, at cp/pt.c:1183

2016-07-31 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf  ---
It was fixed on trunk by r236221. I guess a direct backport may be risky.
Jason?

[Bug c++/70305] 5.3.0 solaris: ld: fatal: relocation error: R_SPARC_DISP32: file ../src/c++11/.libs/libc++11convenience.a

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70305

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
No feedback so closing.

[Bug middle-end/39333] gcc 4.3.3 miscompiles when -finline-small-functions is used

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #32 from Andrew Pinski  ---
As far as I can tell this is not a bug in GCC but a bug in their code where
they have an extern inline function which behaviors differently the normal
function.

[Bug gcov-profile/39669] gcov --preserve-paths causes mangled filenames on windows

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39669

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #4 from Andrew Pinski  ---
No feedback so closing as fixed.

[Bug middle-end/40391] Segfault with -O, iostream, anonymous namespace on PPC

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40391

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #12 from Andrew Pinski  ---
No response in over 6 months so closing.

[Bug libstdc++/40974] [4.9/5/6/7 Regression] cannot build gcc-4.4.1: fenv_t has not been declared

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #61 from Andrew Pinski  ---
No response in 6 months so closing

[Bug target/41155] Compiler internal error with -O3

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41155

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
No response in almost 7 years so closing.

[Bug ada/42141] ACATS C9A009G failure

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42141

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
No response in 7 months so closing.

[Bug bootstrap/42932] unknown endianness, Solaris 10 SPARC

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42932

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Andrew Pinski  ---
No response in over 2 years so closing.

[Bug c++/66564] ICE on explicit instantiation of nested template class

2016-07-31 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66564

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #1 from Markus Trippelsdorf  ---
Confirmed. All version are affected:

markus@x4 tmp % clang++ -std=c++14 -c foo2.ii
foo2.ii:2:1: error: too few template parameters in template redeclaration
template <> template  class Outer<_T_>::Inner<_T_> {};
^~~
foo2.ii:1:1: note: previous template declaration is here
template  struct Outer { template  struct Inner; };
^~~
foo2.ii:3:29: error: explicit instantiation of undefined template
'Outer::Inner'
template struct Outer::Inner;
^
foo2.ii:1:63: note: template is declared here
template  struct Outer { template  struct Inner; };
  ^
2 errors generated.
markus@x4 tmp % icpc -std=c++14 -c foo2.ii
foo2.ii(2): error: nontype "Outer<>::Inner [with =_T_]" is
not a template
  template <> template  class Outer<_T_>::Inner<_T_> {};
^

foo2.ii(2): error: this declaration cannot have multiple "template <...>"
clauses
  template <> template  class Outer<_T_>::Inner<_T_> {};
^

foo2.ii(3): error: incomplete type is not allowed
  template struct Outer::Inner;
   ^

compilation aborted for foo2.ii (code 2)

markus@x4 tmp % g++ -std=c++14 -c foo2.ii
foo2.ii:2:55: internal compiler error: in retrieve_specialization, at
cp/pt.c:1183
 template <> template  class Outer<_T_>::Inner<_T_> {};
   ^~
0x6a2e8f retrieve_specialization
../../gcc/gcc/cp/pt.c:1180
0x6c12d4 tsubst_decl
../../gcc/gcc/cp/pt.c:11689
0x6b8f07 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/gcc/cp/pt.c:12897
0x6d0fdc most_specialized_partial_spec
../../gcc/gcc/cp/pt.c:21075
0x6e94e0 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:9847
0x6e94e0 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:10412
0x78c33b complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:133
0x6edeae do_type_instantiation(tree_node*, tree_node*, int)
../../gcc/gcc/cp/pt.c:21352
0x772329 cp_parser_explicit_instantiation
../../gcc/gcc/cp/parser.c:15662
0x782d11 cp_parser_declaration
../../gcc/gcc/cp/parser.c:12132
0x7815a6 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:12059
0x7818c8 cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4350
0x7818c8 c_parse_file()
../../gcc/gcc/cp/parser.c:37581
0x8e4772 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1070

[Bug libstdc++/68297] Faster std::make_exception

2016-07-31 Thread gleb at scylladb dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68297

Gleb Natapov  changed:

   What|Removed |Added

 CC||gleb at scylladb dot com

--- Comment #2 from Gleb Natapov  ---
I posted proposed solution to libstdc++ mailing list
https://gcc.gnu.org/ml/libstdc++/2016-07/msg00121.html

[Bug c++/72761] New: the "using" keyword has different behaviors

2016-07-31 Thread liweifriends at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72761

Bug ID: 72761
   Summary: the "using" keyword has different behaviors
   Product: gcc
   Version: 5.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: liweifriends at gmail dot com
  Target Milestone: ---

The following code is correct:
template  using Check = std::remove_const;

And the following code is not correct:
template  using Check = std::remove_const;

However, the following code cannot be compiled
=
template  class TLayer>
struct SubLayer
{
template 
using Layer = TLayer;
};

template  struct SubLayerContainer;

template  struct LayerTemp2Type;

template 
struct LayerTemp2Type>
{
// Code that cannot compile
template 
using Check = typename TCur::Layer template ;
};

g++ -Wall -fexceptions --std=c++14 -g --std=c++14  -c
/home/liwei/check/main.cpp -o obj/Debug/main.o
Error: expected ‘;’ before ‘template’

I have to modify the above code as follows to pass the compile:
=
template  class TLayer>
struct SubLayer
{
template 
using Layer = TLayer;
};

template  struct SubLayerContainer;

template  struct LayerTemp2Type;

template 
struct LayerTemp2Type>
{
template 
using Check = typename TCur::Layer;
};
=

[Bug c++/72761] the "using" keyword has different behaviors

2016-07-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72761

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
(In reply to liwei from comment #0)
> // Code that cannot compile
> template 
> using Check = typename TCur::Layer template ;

This is not valid C++, maybe you meant:

using Check = typename TCur::template Layer;

[Bug libstdc++/72745] Please static assert in std::get to check out of range

2016-07-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72745

--- Comment #1 from Jonathan Wakely  ---
This is harder than you think, because the incomplete type error happens in the
return type, so the function body is never instantiated and adding a static
assertion there doesn't help.

[Bug rtl-optimization/71779] [5/6/7 regression] isl miscompiled with -mabi=ilp32

2016-07-31 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71779

--- Comment #19 from Bernd Edlinger  ---
Created attachment 39036
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39036&action=edit
combined patch

Hi,

I've updated the patch again based on Segher's comments.

So that's what I'd like to post on gcc-patches tomorrow.

Again, I'd be happy if you could test it in advance.


Thanks
Bernd.

[Bug other/31233] obstack.h typo

2016-07-31 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31233

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #3 from Eric Gallager  ---
(In reply to Jim Wilson from comment #2)
> In theory, obstack.h is imported from the FSF gnulib package, though
> unfortunately that isn't documented in our codingconventions.html web page,
> and it looks like people have just been modifying it in place.  The parent
> package is here
> http://savannah.gnu.org/projects/gnulib#options
> 
> Looking at the cvs history, it looks like this was broken in revision 1.24
> and fixed in revision 1.32, so we should be able to import a fixed version
> of this file to fix this bug report.
> 
> Except that we will have to deal with local changes somehow.  They really
> should be pushed to the FSF is they aren't already there.

Has it been resynced as part of the "Replace libiberty with gnulib" GSoC
project yet?

[Bug libstdc++/72745] Please static assert in std::get to check out of range

2016-07-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72745

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Sun Jul 31 17:08:52 2016
New Revision: 238924

URL: https://gcc.gnu.org/viewcvs?rev=238924&root=gcc&view=rev
Log:
libstdc++/72745 add static assertion for invalid tuple access

PR libstdc++/72745
* include/std/array (get): Use positive message for static assertions.
* include/std/functional (_Safe_tuple_element_t): Fix indentation.
* include/std/tuple (tuple_element>): Add partial
specialization for invalid indices, with static assertion.
* testsuite/20_util/tuple/element_access/get_neg.cc: New test.

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

[Bug libstdc++/72745] Please static assert in std::get to check out of range

2016-07-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72745

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #3 from Jonathan Wakely  ---
Done for GCC 7.

[Bug other/31233] obstack.h typo

2016-07-31 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31233

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #4 from Manuel López-Ibáñez  ---
(In reply to Eric Gallager from comment #3)
> (In reply to Jim Wilson from comment #2)
> > Except that we will have to deal with local changes somehow.  They really
> > should be pushed to the FSF is they aren't already there.
> 
> Has it been resynced as part of the "Replace libiberty with gnulib" GSoC
> project yet?

Patch is here: https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01302.html

If you can notice any local changes that Ayush may have missed, please reply to
the patch.

[Bug rtl-optimization/71779] [5/6/7 regression] isl miscompiled with -mabi=ilp32

2016-07-31 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71779

--- Comment #20 from Andreas Schwab  ---
Works again.

[Bug c++/64759] The compiler does NOT show a warning in a case where it is reasonable to expect a warning message.

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64759

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #6 from Andrew Pinski  ---
!a is the same as a == 0 which for double is prompted to 0.0.

[Bug c++/65047] [c++17] Add support for nested namespace defintions.

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65047

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Severity|minor   |enhancement

[Bug c/63886] float will fit into int with abs - possible missing warning Wabsolute-value

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63886

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
   Severity|normal  |enhancement

[Bug c++/65047] [c++17] Add support for nested namespace defintions.

2016-07-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65047

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #6 from Jonathan Wakely  ---
Done for GCC 6.

https://gcc.gnu.org/projects/cxx-status.html

[Bug c/63886] float will fit into int with abs - possible missing warning Wabsolute-value

2016-07-31 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63886

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #9 from Manuel López-Ibáñez  ---
(In reply to David Binderman from comment #6)
> (In reply to Marek Polacek from comment #5)
> > Seems like there's nothing to do for this bug.
> 
> Suggest there are two cases
> 
> 1. double to float

Note that 3.1 and 3.1f are not the same number:

  double d1 = 3.100088817841970012523233890533447265625e+0;
  float f1 = 3.09904632568359375e+0;

and the former does not fit in 'float' (if it fits, we do not warn).

> 2. double or float into any integer type.
> 
> The one warning, produced by -Wfloat-conversion, could be
> split into two warnings, as per the two cases.

-Wfloat-to-int-conversion?

Should it warn for vfloat = 16777217;  ?

If so, perhaps we need another name.

> #1 isn't very useful, #2 seems useful to me.
> 
> Then put case #1 into -Wall.

case #2 ? 

I guess useful is in the eye of the beholder. The whole reason why I added
-Wconversion more than 10 years ago was precisely to track lossy
float-to-double and double-to-float conversions in a project of mine.

[Bug c/63886] float will fit into int with abs - possible missing warning Wabsolute-value

2016-07-31 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63886

Manuel López-Ibáñez  changed:

   What|Removed |Added

   Keywords||easyhack

--- Comment #10 from Manuel López-Ibáñez  ---
(In reply to Eric Gallager from comment #8)
> (In reply to Andreas Schwab from comment #4)
> > float f = 3.1f;
> 
> Isn't there already -Wunsuffixed-float-constants for warnings with that kind
> of fix?

-Wfloat-conversion is not warning about the lack of suffix, but about the fact
that 3.1 does not fit into a double (3.5 does, so there is no warning).

float f;
double d;

f = 3.100088817841970012523233890533447265625; // 
-Wfloat-conversion -Wunsuffixed-float-constants
d = 3.100088817841970012523233890533447265625; //
-Wunsuffixed-float-constants (not sure why!)
f = 3.5; // -Wunsuffixed-float-constants 
d = 3.5; // -Wunsuffixed-float-constants (not sure why!)
f = 3.1f; // no warning
d = 3.1f; // no warning

[Bug libitm/69115] transactional memory attributes are missing docs and inconsistent with spec

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69115

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||documentation
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-08-01
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug target/71680] [7 Regression] ICE: Max. number of generated reload insns per insn is achieved (90) w/ -Os -mlra

2016-07-31 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71680

--- Comment #11 from Arseny Solokha  ---
(In reply to Alan Modra from comment #10)
> Arseny, I could not reproduce the problem using your testcase, and I tried a
> dozen or so revisions around 20160626 buiding powerpc-e500v2-linux-gnuspe
> cross-compilers on an x86_64-linux host.  Please specify the svn revision
> number or git commit that you used, and your gcc configure parameters.

I test weekly gcc snapshots from ftp://gcc.gnu.org/pub/gcc/snapshots. I'm still
able to reproduce it w/ 7.0.0_alpha20160731. svn revisions for 20160626 and
20160731 are r237793 and r238930, respectively, according to [1,2].

% powerpc-e500v2-linux-gnuspe-gcc-7.0.0-alpha20160731 -v 
Using built-in specs.
COLLECT_GCC=powerpc-e500v2-linux-gnuspe-gcc-7.0.0-alpha20160731
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731/lto-wrapper
Target: powerpc-e500v2-linux-gnuspe
Configured with:
/var/tmp/portage/cross-powerpc-e500v2-linux-gnuspe/gcc-7.0.0_alpha20160731/work/gcc-7-20160731/configure
--host=x86_64-pc-linux-gnu --target=powerpc-e500v2-linux-gnuspe
--build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/powerpc-e500v2-linux-gnuspe/gcc-bin/7.0.0-alpha20160731
--includedir=/usr/lib/gcc/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731/include
--datadir=/usr/share/gcc-data/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731
--mandir=/usr/share/gcc-data/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731/man
--infodir=/usr/share/gcc-data/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731/include/g++-v7
--with-python-dir=/share/gcc-data/powerpc-e500v2-linux-gnuspe/7.0.0-alpha20160731/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --disable-nls --enable-checking=yes --enable-libstdcxx-time
--enable-poison-system-directories
--with-sysroot=/usr/powerpc-e500v2-linux-gnuspe --disable-bootstrap
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib --disable-altivec
--disable-fixed-point --enable-e500-double --enable-targets=all
--disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp
--disable-libcilkrts --disable-libmpx --disable-vtable-verify --disable-libvtv
--disable-libquadmath --enable-lto --with-isl --disable-isl-version-check
--enable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.0.0-alpha20160731 20160731 (experimental) (GCC)

I can attach RTL dumps if necessary.


[1] https://gcc.gnu.org/ml/gcc/2016-06/msg00155.html
[2] https://gcc.gnu.org/ml/gcc/2016-07/msg00253.html

[Bug c++/72762] New: Cann't demangle auto arguments of C++14 generic lambda

2016-07-31 Thread fujii.hironori at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72762

Bug ID: 72762
   Summary: Cann't demangle auto arguments of C++14 generic lambda
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fujii.hironori at gmail dot com
  Target Milestone: ---

Created attachment 39037
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39037&action=edit
gl.cpp (test case)

>  $ g++ -g -O2 -std=c++14 -c gl.cpp
>  $ nm -C gl.o
> 0010 T f()
>  U g(void (*)(int, int&, int&&))
>  t 
> _ZZ1fvENUlT_RT0_OT1_E_4_FUNIiiiEEDTcldtLPv0EclscOS_fp_scS1_fp0_scS3_fp1_EES_S1_S3_
>  $

[Bug c++/72762] Cann't demangle auto arguments of C++14 generic lambda

2016-07-31 Thread fujii.hironori at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72762

--- Comment #1 from Fujii Hironori  ---
 $ ./demangle
_ZZ1fvENUlT_RT0_OT1_E_4_FUNIiiiEEDTcldtLPv0EclscOS_fp_scS1_fp0_scS3_fp1_EES_S1_S3_
typed name
  local name
typed name
  name 'f'
  function type
argument list
template
  qualified name
lambda 0
  argument list
template parameter 0
argument list
  reference
template parameter 1
  argument list
rvalue reference
  template parameter 2
name '_FUN'
  template argument list
builtin type int
template argument list
  builtin type int
  template argument list
builtin type int
  function type
argument list
  decltype
binary operator
  operator ()
  binary operator arguments
binary operator
  operator .
  binary operator arguments
literal
  pointer
builtin type void
  name '0'
operator ()
argument list
  binary operator
operator static_cast
binary operator arguments
  rvalue reference
template parameter 0
  function parameter 1
  argument list
binary operator
  operator static_cast
  binary operator arguments
reference
  template parameter 1
function parameter 2
argument list
  binary operator
operator static_cast
binary operator arguments
  rvalue reference
template parameter 2
  function parameter 3
  argument list
template parameter 0
argument list
  reference
template parameter 1
  argument list
rvalue reference
  template parameter 2
Failed:
_ZZ1fvENUlT_RT0_OT1_E_4_FUNIiiiEEDTcldtLPv0EclscOS_fp_scS1_fp0_scS3_fp1_EES_S1_S3_
(status -2)
 $

[Bug c++/72762] Cann't demangle auto arguments of C++14 generic lambda

2016-07-31 Thread fujii.hironori at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72762

--- Comment #2 from Fujii Hironori  ---
In GDB, this function is shown as:

> ::operator void (*)(int, int&, int&&) int, int>(void) const

[Bug preprocessor/62661] digit separator warning in if'ed out code

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62661

Andrew Pinski  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Andrew Pinski  ---
(In reply to Jonathan Wakely from comment #2)
> But in C++14 tokenization should handle digit separators, see the definition
> of pp-number in 2.9 [lex.ppnumber], which allows single quotes in a
> pp-number.

Right it does not warn for C++14 and above so there is no bug and even was
mention in the original comment:
C or C++ < C++14

[Bug c++/72763] New: incorrectly accepts invalid C++11 code that instantiates a non-template class

2016-07-31 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72763

Bug ID: 72763
   Summary: incorrectly accepts invalid C++11 code that
instantiates a non-template class
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It affects 4.8.x and later, and is correctly rejected by 4.7.x. 


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160731 (experimental) [trunk revision 238915] (GCC) 
$ 
$ g++-trunk -c -Wall -Wextra -std=c++11 small.cpp
$ clang++-3.8 -c -std=c++11 small.cpp
small.cpp:3:25: error: 'D' following the 'template' keyword does not refer to a
template
template < typename T > using C = typename A < T >::template D < T >; 
^
small.cpp:7:14: note: in instantiation of template type alias 'C' requested
here
  struct D : C < T > {}; 
 ^
1 error generated.
$ 
$ g++-4.7 -c -std=c++11 small.cpp
small.cpp:3:69: error: ‘typename A<  >::D’ names
‘struct A<  >::D’, which is not a class template
$ 


---


template < typename > struct A; 

template < typename T > using C = typename A < T >::template D < T >; 

template < typename T > struct A 
{
  struct D : C < T > {}; 
};

A < int > a;

[Bug target/68535] arm.c: 5 * set but not used

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68535

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2015-11-25 00:00:00 |2016-7-31
  Known to fail||6.1.0

--- Comment #2 from Andrew Pinski  ---
So there is no confusion here.
Look at gen_ldm_seq:
The last set to base_reg is not needed.

Look at arm_gen_movmemqi, the for loop that sets i and increments i but never
uses i; The condition that is used here is in_words_to_go.

Look at arm_expand_prologue: the last setting of insn and insn is not used
after that point.

Look at thumb_pop: pushed_words is only set or incremented and never used
otherwise.

For the last one look at thumb1_emit_multi_reg_push, the last setting of
regs_to_pop is not used after that except in a comment.

[Bug c++/72764] New: ICE on invalid C++11 code instantiating an alias template: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in typedef_variant_p, at tree.c:12660

2016-07-31 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72764

Bug ID: 72764
   Summary: ICE on invalid C++11 code instantiating an alias
template: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in typedef_variant_p, at
tree.c:12660
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It affects 4.8.x and later, which ICE without any proper diagnostics. It is
correctly rejected by 4.7.x. 

It is related to PR 72763, which is derived from the same original test. 


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160731 (experimental) [trunk revision 238915] (GCC)
$
$ g++-trunk -c -std=c++11 small.cpp
small.cpp:10:26: internal compiler error: tree check: expected class ‘type’,
have ‘exceptional’ (error_mark) in typedef_variant_p, at tree.c:12660
   struct D : B < C < T > > {};
  ^
0x1071227 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc-source-trunk/gcc/tree.c:9793
0x10812d0 tree_class_check
../../gcc-source-trunk/gcc/tree.h:3402
0x10812d0 typedef_variant_p(tree_node const*)
../../gcc-source-trunk/gcc/tree.c:12660
0x852520 strip_typedefs(tree_node*, bool*)
../../gcc-source-trunk/gcc/cp/tree.c:1494
0x6bba03 canonicalize_type_argument
../../gcc-source-trunk/gcc/cp/pt.c:6979
0x6f31b6 convert_template_argument
../../gcc-source-trunk/gcc/cp/pt.c:7251
0x6feea3 coerce_template_parms
../../gcc-source-trunk/gcc/cp/pt.c:7746
0x700dda lookup_template_class_1
../../gcc-source-trunk/gcc/cp/pt.c:8319
0x700dda lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc-source-trunk/gcc/cp/pt.c:8662
0x81e28d finish_template_type(tree_node*, tree_node*, int)
../../gcc-source-trunk/gcc/cp/semantics.c:3133
0x7aa444 cp_parser_template_id
../../gcc-source-trunk/gcc/cp/parser.c:14961
0x7aa6ea cp_parser_class_name
../../gcc-source-trunk/gcc/cp/parser.c:21265
0x79910d cp_parser_qualifying_entity
../../gcc-source-trunk/gcc/cp/parser.c:6271
0x79910d cp_parser_nested_name_specifier_opt
../../gcc-source-trunk/gcc/cp/parser.c:5955
0x791fd4 cp_parser_base_specifier
../../gcc-source-trunk/gcc/cp/parser.c:23046
0x791fd4 cp_parser_base_clause
../../gcc-source-trunk/gcc/cp/parser.c:22895
0x791fd4 cp_parser_class_head
../../gcc-source-trunk/gcc/cp/parser.c:22102
0x791fd4 cp_parser_class_specifier_1
../../gcc-source-trunk/gcc/cp/parser.c:21347
0x791fd4 cp_parser_class_specifier
../../gcc-source-trunk/gcc/cp/parser.c:21656
0x791fd4 cp_parser_type_specifier
../../gcc-source-trunk/gcc/cp/parser.c:15883
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$





template < typename > struct A;
template < typename > struct B {};

template < typename T >
using C = typename A < T >::template D < T >;

template < typename T > struct A
{ 
  // should be: template < typename > struct D : B < C < T > > {};
  struct D : B < C < T > > {};
};

A < int > a;

[Bug c++/64433] Segmentation fault while compiling

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64433

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code,
   ||rejects-valid
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.3

--- Comment #3 from Andrew Pinski  ---
Fixed in 5.3 and above at least.

[Bug c++/64501] Unreachable catch BB for try blocks that cannot create an exception of specific type

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64501

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug target/58112] Ineffective addressing mode used in loop.

2016-07-31 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58112

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
   Severity|normal  |enhancement

--- Comment #2 from Andrew Pinski  ---
I think you should try this again with a newer compiler, it is most likely
fixed.