[Bug libstdc++/106780] gcc maybe-uninitialized warning on std_function.h

2022-08-31 Thread vincent.lextrait at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106780

--- Comment #3 from Vincent  ---
Yes it seems safe to consider it a dupe.

[Bug libstdc++/106780] New: gcc maybe-uninitialized warning on std_function.h

2022-08-30 Thread vincent.lextrait at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106780

Bug ID: 106780
   Summary: gcc maybe-uninitialized warning on std_function.h
   Product: gcc
   Version: 12.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

Maybe not the right place to report this bug. Apologies in advance if it is
not. I am using the ready-made gcc-12.1.0_1 version of gcc-12.1.0 downloaded
with brew on a Mac.

The compilation flags are -Wall -Wextra -pedantic-errors.

gcc warns when including the regex header:

In constructor 'std::function<_Res(_ArgTypes
...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = bool;
_ArgTypes = {char}]',
inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/usr/local/Cellar/gcc@12/12.1.0_1/include/c++/12/bits/regex_automaton.h:149:4,
inlined from
'std::__detail::_State<_Char_type>::_State(std::__detail::_State<_Char_type>&&)
[with _Char_type = char]' at
/usr/local/Cellar/gcc@12/12.1.0_1/include/c++/12/bits/regex_automaton.h:146:7,
inlined from 'std::__detail::_StateIdT
std::__detail::_NFA<_TraitsT>::_M_insert_subexpr_end() [with _TraitsT =
std::__cxx11::regex_traits]' at
/usr/local/Cellar/gcc@12/12.1.0_1/include/c++/12/bits/regex_automaton.h:290:24:
/usr/local/Cellar/gcc@12/12.1.0_1/include/c++/12/bits/std_function.h:405:42:
warning: '*(std::function*)((char*)&__tmp +
offsetof(std::__detail::_StateT,
std::__detail::_State::.std::__detail::_State_base::)).std::function::_M_invoker'
may be used uninitialized [-Wmaybe-uninitialized]
  405 |   : _Function_base(), _M_invoker(__x._M_invoker)
  |  ^~

[Bug c++/105806] [concepts] template class specialization using concept issue

2022-06-01 Thread vincent.lextrait at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105806

Vincent  changed:

   What|Removed |Added

 CC||vincent.lextrait at gmail dot 
com

--- Comment #1 from Vincent  ---
The bug is present from gcc-9.2 to gcc-12.1.

[Bug c++/100299] New: cc1plus taking all RAM

2021-04-27 Thread vincent.lextrait at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100299

Bug ID: 100299
   Summary: cc1plus taking all RAM
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

Created attachment 50692
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50692=edit
ii file to reproduce the issue. gunzip first.

While compiling a relatively large file (ii file ~2 MB), g++ compilation in -O3
aborts after suddenly allocating in a few steps within a few seconds all the
RAM (128 GB!).

Compiles just fine with -O2 (and it takes 5 times longer than to abort in -O3).

To my utter surprise, it compiles with -O2 -fgcse-after-reload -fipa-cp-clone
-floop-interchange -floop-unroll-and-jam -fpeel-loops -fpredictive-commoning
-fsplit-loops -fsplit-paths -ftree-loop-distribution -ftree-loop-vectorize
-ftree-partial-pre -ftree-slp-vectorize -funswitch-loops -fvect-cost-model
-fvect-cost-model=dynamic -fversion-loops-for-strides

While the specific 11.1 man specifies that these options are equivalent to -O3.
Excerpt of man:

-O3 Optimize yet more.  -O3 turns on all optimizations specified by -O2 and
also turns on the following optimization flags:

   -fgcse-after-reload -fipa-cp-clone -floop-interchange
-floop-unroll-and-jam -fpeel-loops -fpredictive-commoning -fsplit-loops
   -fsplit-paths -ftree-loop-distribution -ftree-loop-vectorize
-ftree-partial-pre -ftree-slp-vectorize -funswitch-loops
   -fvect-cost-model -fvect-cost-model=dynamic
-fversion-loops-for-strides

The man must not be correct, some other option must be added in -O3.

I am on x86_64-linux-gnu (Ubuntu 20.04) - but I am fairly sure it is not
platform-dependent.

gcc is configured using 

./configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu --prefix=/usr/local/gcc-11.1
--enable-checking=release --enable-languages=c,c++ --disable-multilib
--program-suffix=-11.1

The complete command line that triggers the bug:

g++-11.1 -std=c++20 -O3 -c test.ii

The error:

g++-11.1: fatal error: Killed signal terminated program cc1plus
compilation terminated.

gzipped test.ii attached to this bug report.

Previous versions of gcc do not exhibit the bug, but do compile very very
slowly compared to -O0 option, or compared to clang.

[Bug c++/91857] New: internal compiler error: in verify_marks_clear, at dwarf2out.c:29123

2019-09-22 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91857

Bug ID: 91857
   Summary: internal compiler error: in verify_marks_clear, at
dwarf2out.c:29123
   Product: gcc
   Version: 9.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

Erratic (sorry) error, with gcc on MacOS 10.14.6.
The title says it all.

[Bug c++/89978] New: Extraneous template keyword not rejected

2019-04-04 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89978

Bug ID: 89978
   Summary: Extraneous template keyword not rejected
   Product: gcc
   Version: 8.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

The compiler does not reject the following:

struct A{
  void f(){}
};

struct B{
  static A& n(){
return *new A();
  }
};

template 
struct C{
  void g(){
T::n().template f();
  }
};

int main(){
  (new C())->g();
}

Function A::f is not template.

[Bug c++/67650] undef reference with -fdevirtualize

2019-02-25 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #33 from Vincent  ---
Still in gcc 8.3.0.

[Bug c++/89179] compiler error: in ggc_set_mark, at ggc-page.c:1532

2019-02-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89179

--- Comment #12 from Vincent  ---
Thanks, Andrew.

[Bug c++/89179] compiler error: in ggc_set_mark, at ggc-page.c:1532

2019-02-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89179

--- Comment #10 from Vincent  ---
Yes, sorry about that.
Alas, I don't use them...

[Bug c++/89179] compiler error: in ggc_set_mark, at ggc-page.c:1532

2019-02-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89179

--- Comment #7 from Vincent  ---
I understand.
It might have something to do with 67650, which was been in gcc since 2005, and
is fully reproducible until now (8.2.0). It seems to be a memory error too.
Sadly, nobody ever gave it a try.

[Bug c++/89179] compiler error: in ggc_set_mark, at ggc-page.c:1532

2019-02-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89179

--- Comment #5 from Vincent  ---
Hmm, hard to do, it is monumental and contains a ton of stuff I cannot share...
Sorry about that, I realize it makes diagnosis quite difficult.

[Bug c++/89179] compiler error: in ggc_set_mark, at ggc-page.c:1532

2019-02-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89179

--- Comment #3 from Vincent  ---
It on MacOS Mojave 10.14.2.
The command line options are:
/usr/local/bin/g++-8 -c -DNDEBUG -O3 -fvisibility=hidden -Wall -Wextra
-pedantic-errors -DDARWIN -std=c++17 -fvisibility-inlines-hidden

[Bug c++/89179] New: compiler error: in ggc_set_mark, at ggc-page.c:1532

2019-02-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89179

Bug ID: 89179
   Summary: compiler error: in ggc_set_mark, at ggc-page.c:1532
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

/usr/local/Cellar/gcc/8.2.0/include/c++/8.2.0/bits/cpp_type_traits.h:420:20:
internal compiler error: in ggc_set_mark, at ggc-page.c:1532
 { return __it; }
^
Erratic, looks like an uninitialized memory read, or something of the kind.

[Bug c++/67650] undef reference with -fdevirtualize

2018-07-27 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

Vincent  changed:

   What|Removed |Added

Version|8.1.0   |8.2.0

--- Comment #32 from Vincent  ---
The bug is still in 8.2.0.

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-06 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #31 from Vincent  ---
It turns out we might be in front of two bugs actually. With 8.1 I have a new
diagnosis for this 67650 bug (definition missing at compile time, not just at
link edition time), but I do have other parts of my old code where 8.1 is now
reporting missing definitions, and the definitions are there (definitions are
shown in the error message from 8.1 itself). And no virtuals are involved there
at all.

So either the old bug is now much more extensive, or there are two bugs now in
the same general "area".

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #30 from Vincent  ---
Am using OSX, but I do not believe it makes a big difference. Thanks, Jonathan,
let me know if I can help in any way.

(In reply to Jonathan Wakely from comment #29)
> (In reply to Vincent from comment #27)
> > Sorry for the silly check, are you sure you are trying with -O3 or
> > -fdevirtualize -O2? 
> 
> I've tried both. I'm using x86_64-pc-linux-gnu though.
> 
> 
> > You can try this with 8.1:
> > 
> > void *v;
> > 
> > template 
> > struct LK: public BLKC
> > {
> >   void rb(){((T*)v)->ax();}
> >   static T* st;
> > };
> > 
> > As a replacement to the call to null, and the missing definition problem is
> > reported.
> 
> OK now I can reproduce it with trunk.
> 
> (In reply to Vincent from comment #28)
> > Other silly check, did you try with my code or your reduced code ?
> 
> Yours.
> 
> Here's the reduced form that gives a link-error with trunk:
> 
> #include 
> 
> template 
> struct RE
> {
>   virtual void rp()=0;
>   void ax(){rp();}
> };
> 
> struct EN : RE
> {
>   EN(::std::string = ""){}
>   void rp(){}
> };
> 
> template 
> struct AN : RE
> {
>   void rp(){}
> };
> 
> template 
> struct LK
> {
>   T* p = nullptr;
>   virtual void rb(){p->ax();}
> };
> 
> template 
> struct LR
> {
>   virtual ~LR(){}
>   struct LLC { virtual ~LLC(){} };
>   LK l;
> };
> 
> constexpr char ET[]="";
> struct I : EN
> {
>   LR _e;
> };
> 
> int main(){new I();}
> 
> 
> $ ~/gcc/8.1.0/bin/g++ -Wall -O1 -fdevirtualize main.cc 
> main.cc:19:8: warning: ‘void AN::rp() [with OC = LR<(& ET)>::LLC]’ used
> but never defined
>void rp(){}
> ^~
> /tmp/cc4IHAPf.o: In function `LK::LLC> >::rb()':
> main.cc:(.text+0x37): undefined reference to `AN::LLC>::rp()'
> collect2: error: ld returned 1 exit status

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #28 from Vincent  ---
Other silly check, did you try with my code or your reduced code ?

(In reply to Jonathan Wakely from comment #26)
> (In reply to Vincent from comment #25)
> > Oh, it used to be the case. I think that must be due to some additional
> > artefact of more recent compilers. I'll try to find another way to show it.
> 
> I tried 5.1.0 and 5.2.0 and several other previous releases, they all link
> the program successfully, with just this warning:
> 
> main.cpp:53:8: warning: 'I' has a field 'I::_e' whose type uses the
> anonymous namespace

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #27 from Vincent  ---
Sorry for the silly check, are you sure you are trying with -O3 or
-fdevirtualize -O2? 

You can try this with 8.1:

void *v;

template 
struct LK: public BLKC
{
  void rb(){((T*)v)->ax();}
  static T* st;
};

As a replacement to the call to null, and the missing definition problem is
reported.

(In reply to Jonathan Wakely from comment #26)
> (In reply to Vincent from comment #25)
> > Oh, it used to be the case. I think that must be due to some additional
> > artefact of more recent compilers. I'll try to find another way to show it.
> 
> I tried 5.1.0 and 5.2.0 and several other previous releases, they all link
> the program successfully, with just this warning:
> 
> main.cpp:53:8: warning: 'I' has a field 'I::_e' whose type uses the
> anonymous namespace

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #25 from Vincent  ---
Oh, it used to be the case. I think that must be due to some additional
artefact of more recent compilers. I'll try to find another way to show it.

(In reply to Jonathan Wakely from comment #24)
> (In reply to Vincent from comment #22)
> > See comment #6.
> 
> I already saw it, and I already tried that change. The problem disappears if
> you make that change. 
> 
> (In reply to Vincent from comment #23)
> > See comment #10. The error is sensitive to unrelated changes. There is some
> > (front-end?) corruption somewhere.
> 
> I'm not convinced by that either.

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #23 from Vincent  ---
See comment #10. The error is sensitive to unrelated changes. There is some
(front-end?) corruption somewhere.

(In reply to Jonathan Wakely from comment #21)
> Comment 19 shows a bogus warning triggered by -fdevirtualize but I'm not
> convinced the original report of a link-error bug is valid.

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #22 from Vincent  ---
See comment #6.

(In reply to Jonathan Wakely from comment #20)
> (In reply to Vincent from comment #5)
> > The problem is static time, not dynamic time.
> > This artefact is just a result of source code reduction. In  my code there
> > is no "0", and the problem exists.
> 
> Are you sure about that? Using your original testcase I can only reproduce
> the link error when it has ((T*)0)->ax()

[Bug c++/67650] undef reference with -fdevirtualize

2018-05-03 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #18 from Vincent  ---
Still in 8.1, now with a different diagnosis:

g++-8 -c -O3 67650.cpp
67650.cpp:33:8: warning: 'void AN::rp() [with OC = LR::LLC; RC = BLKC]' used but never defined
   void rp(){}
^~
Ironically the message complains about the non definition of the member
function, and displays that very definition...

[Bug c++/67650] undef reference with -fdevirtualize

2018-01-25 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

Vincent  changed:

   What|Removed |Added

Version|5.2.0   |7.3.0

--- Comment #17 from Vincent  ---
Still there in 7.3.0.

[Bug c++/67650] undef reference with -fdevirtualize

2017-08-15 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #16 from Vincent  ---
Still there in 7.2.0.

[Bug c++/67650] undef reference with -fdevirtualize

2017-05-04 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #15 from Vincent  ---
Still there in 7.1.0.

[Bug c++/67650] undef reference with -fdevirtualize

2016-07-14 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #14 from Vincent  ---
The bug is still in 6.1.0.

[Bug c++/67650] undef reference with -fdevirtualize

2016-04-22 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #13 from Vincent  ---
Indeed, that sounds like the same bug.
It took me an entire afternoon shrinking my case down to the code provided in
attachment, it was a needle in a huge haystack. I haven't been able to reduce
the code further. Even tiny changes which seem completely unrelated make the
bug disappear.
It looks very much like a front-end bug.
I am surprised there hasn't been any confirmation of the bug so far, and it has
been resting in bugzilla 7 months so far, only with updates saying it's not a
bug.

[Bug c++/67650] undef reference with -fdevirtualize

2016-01-29 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #11 from Vincent  ---
Just tested with 5.3.0, still there.

[Bug c++/67650] undef reference with -fdevirtualize

2016-01-10 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #10 from Vincent  ---
Additionally, in the snippet:

template 
struct EN: public RE
{
  EN(::std::string){}
  void rp(){}
};

If you replace ::std::string by const char*, the problem disappears.
More generally, essentially any simplification of the code, unrelated to
virtuals, makes the problem disappear.

[Bug c++/67650] undef reference with -fdevirtualize

2016-01-10 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #9 from Vincent  ---
To my knowledge that virtual function is duly defined:

template 
struct AN: public RE
{
  void rp(){}
};

[Bug c++/67650] undef reference with -fdevirtualize

2015-09-20 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #5 from Vincent  ---
The problem is static time, not dynamic time.
This artefact is just a result of source code reduction. In  my code there is
no "0", and the problem exists.
I can provide an alternative case without this artefact, but I do not believe
it harms investigations at all.


[Bug c++/67650] undef reference with -fdevirtualize

2015-09-20 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #6 from Vincent  ---
Replace it with (new T())->ax() if you have doubts. Same thing.


[Bug c++/67650] New: undef reference with -fdevirtualize

2015-09-20 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

Bug ID: 67650
   Summary: undef reference with -fdevirtualize
   Product: gcc
   Version: 5.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

I get an undefined symbol when using -O2, more specifically, after trying all
additional options on top of -O1, this is due to -fdevirtualize. With -O1
-devirtualize, the symbol is missing. It's not missing with just -O1.
The symbol is a virtual member function of a class template.
I checked that the issue does not occur with gcc-4.9.2, it is new in gcc-5.

Is it worth it to try reducing my code and produce a code snippet exhibiting
the issue? Or is the issue known already? I didn't find any track of it.

gcc version:
/usr/local/bin/g++-5 -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++-5
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.2.0/libexec/gcc/x86_64-apple-darwin14.4.0/5.2.0/lto-wrapper
Target: x86_64-apple-darwin14.4.0
Configured with: ../configure --build=x86_64-apple-darwin14.4.0
--prefix=/usr/local/Cellar/gcc/5.2.0
--libdir=/usr/local/Cellar/gcc/5.2.0/lib/gcc/5
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking
--enable-checking=release --enable-lto --with-build-config=bootstrap-debug
--disable-werror --with-pkgversion='Homebrew gcc 5.2.0'
--with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin
--disable-nls --enable-multilib
Thread model: posix
gcc version 5.2.0 (Homebrew gcc 5.2.0)


[Bug c++/67650] undef reference with -fdevirtualize

2015-09-20 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #2 from Vincent  ---
Ok, working on it, thanks.


[Bug c++/67650] undef reference with -fdevirtualize

2015-09-20 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67650

--- Comment #3 from Vincent  ---
Created attachment 36355
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36355=edit
Test case

Compile using gcc 5.2.0:
g++-5 -O1 -std=c++11 main.ii -fdevirtualize

The function missing at link edition is:

AN::LLC, BLKC>::rp()

Without -fdevirtualize, the function is there.


[Bug c++/67594] Bug on partial specialization? Incomplete type.

2015-09-15 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67594

--- Comment #5 from Vincent  ---
Thanks Jonathan to take the time. I have to reread the manual... Apologies for
using bandwidth.


[Bug c++/67594] Bug on partial specialization? Incomplete type.

2015-09-15 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67594

--- Comment #3 from Vincent  ---
Oh, I see. So the first partial specialization is not "preferred" over the
general template?

(In reply to Jonathan Wakely from comment #2)
> The partial specialization C uses the default template argument, so
> is identical to C, so you have tried to make it its own base class.


[Bug c++/67594] Bug on partial specialization? Incomplete type.

2015-09-15 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67594

--- Comment #1 from Vincent  ---
I've changed gcc version to 5.2, as 5.2 issues the same error.


[Bug c++/67594] New: Bug on partial specialization? Incomplete type.

2015-09-15 Thread vincent.lextrait at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67594

Bug ID: 67594
   Summary: Bug on partial specialization? Incomplete type.
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vincent.lextrait at gmail dot com
  Target Milestone: ---

# 1 "foo.cpp"

# 1 ""

# 1 ""

# 1 "foo.cpp"

template  class C{};

template  class C<float,I>{};

template <> class C: public C<float,1>{};

C c;

When compiled with:

/usr/local/bin/gcc-4.9 -c foo.cpp

Issues:

foo.cpp:3:36: error: invalid use of incomplete type 'class C'
 template <> class C: public C<float,1>{};
^
foo.cpp:3:19: error: declaration of 'class C'
 template <> class C: public C<float,1>{};
   ^

I do not see anything incomplete there.
gcc version 4.9.2:

Using built-in specs.

COLLECT_GCC=/usr/local/bin/gcc-4.9

COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.2_1/libexec/gcc/x86_64-apple-darwin14.3.0/4.9.2/lto-wrapper

Target: x86_64-apple-darwin14.3.0

Configured with: ../configure --build=x86_64-apple-darwin14.3.0
--prefix=/usr/local/Cellar/gcc/4.9.2_1
--libdir=/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog
--with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes
--enable-stage1-checking --enable-checking=release --enable-lto
--with-build-config=bootstrap-debug --disable-werror
--with-pkgversion='Homebrew gcc 4.9.2_1'
--with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin
--disable-nls --enable-multilib

Thread model: posix

gcc version 4.9.2 (Homebrew gcc 4.9.2_1)