[Bug c/96421] New: missing __builtin_ia32_pand256 in X86 AVX2 intrinsics

2020-08-02 Thread f.heckenb...@fh-soft.de
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- % cat test.c #include #include #include /* static __v4di __builtin_ia32_pand256 (__v4di a, __v4di b) { __v4di r; __asm__ ("vpand %1, %2, %0" : &qu

[Bug c++/95639] New: wrong error location

2020-06-11 Thread f.heckenb...@fh-soft.de
: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- This may be similar to #93979, but I'm not sure. % cat test.cpp #define S(A) sizeof (A) int main () { int a[10]; return (int) S (a); } % g++ -Wold-style-cast test.cpp t.cpp: In function 'int main

[Bug c++/95179] New: explicit constructor not used for static inline member

2020-05-17 Thread f.heckenb...@fh-soft.de
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- GCC refuses to use the explicit constructor for "c" below, while it does use it for "a" and "b". (It compiles without "explicit"

[Bug c++/94803] New: wrong class name in error message

2020-04-27 Thread f.heckenb...@fh-soft.de
++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- % cat test.cpp struct a { void f (); }; struct b: a { void f () { a::f (0); } }; int main () { } % g++ test.cpp test.cpp: In member function 'void b::f()': test.cpp:8:22: error

[Bug c++/94265] New: wrong warning "duplicated 'if' condition"

2020-03-22 Thread f.heckenb...@fh-soft.de
mponent: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- % cat t.cpp #include struct S { int a, b; }; int main () { if (auto [a,b] = S { 0, 1 }; a) { } else if (std::tie (a, b) = std::tuple (2, 3); a) { } } % g++

[Bug c++/93979] New: missing context in error message due to inheriting template constructor

2020-02-28 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- The following code: template void f (T) = delete; struct A { template A (T v) { f (v); } }; struct B: A { using

[Bug c++/92700] New: wrong "unintialized" warning with std::optional

2019-11-27 Thread f.heckenb...@fh-soft.de
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- #include #include int e; template std::optional f () { if (auto i = std::string ().find ('a')) return i; return { }; } int main () { size_t j = 1;

[Bug preprocessor/91037] New: #pragma GCC diagnostic ignored "-Wunused-macros" ignored for doubly-defined macro with g++

2019-06-29 Thread f.heckenb...@fh-soft.de
NCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- % cat unused.cpp #pragma GCC diagnostic ignored "-Wunused-macros" #define YYUSE #de

[Bug c++/91032] [9/10 Regression] ICE in ocp_convert, at cp/cvt.c:766

2019-06-28 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91032 Frank Heckenbach changed: What|Removed |Added CC||f.heckenb...@fh-soft.de --- Comment

[Bug libstdc++/80654] is_trivially_copy_constructible fails with compiler error with vector of uncopyable objects

2018-04-01 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654 --- Comment #9 from Frank Heckenbach <f.heckenb...@fh-soft.de> --- Found another possible workaround: "Lie" to the compiler (though is it lying when you're actually telling it the truth? ;) by specializing std::is_trivially_co

[Bug libstdc++/80654] is_trivially_copy_constructible fails with compiler error with vector of uncopyable objects

2018-04-01 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654 --- Comment #8 from Frank Heckenbach <f.heckenb...@fh-soft.de> --- (In reply to Ville Voutilainen from comment #7) > That's not a bug. You need to make the copy constructor of s conditionally > deleted depending on whether T is copyc

[Bug libstdc++/80654] is_trivially_copy_constructible fails with compiler error with vector of uncopyable objects

2018-04-01 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654 --- Comment #6 from Frank Heckenbach <f.heckenb...@fh-soft.de> --- Tried to use a self-written (simple) container as a stop-gap, but it also fell prey to this bug. Daniel Krügler wrote: "std::vector's copy constructor is not SFIN

[Bug libstdc++/80654] is_trivially_copy_constructible fails with compiler error with vector of uncopyable objects

2018-04-01 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654 Frank Heckenbach <f.heckenb...@fh-soft.de> changed: What|Removed |Added CC| |f.h

[Bug c++/81394] New: wrong "useless cast" message in inheriting constructor

2017-07-11 Thread f.heckenb...@fh-soft.de
iority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- % cat t.cpp struct a { template a (T && v) { } }; struct b: a { using a::a; }; int main () { b { "foo" }; } % g++ -Wuseless-cast t.

[Bug middle-end/70455] New: spurious "assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]"

2016-03-30 Thread f.heckenb...@fh-soft.de
Version: 5.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- Possibly a duplicate of 34515, but that one seems to

[Bug driver/57951] -MG doesn't work with -MD

2015-07-05 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57951 --- Comment #2 from Frank Heckenbach f.heckenb...@fh-soft.de --- Another bug that may be related to this one (and certainly depends on it), originally reported as Debian bug #613551: Tested with gcc-4.1 (apparently the last version that did

[Bug testsuite/66154] ReserveShadowMemoryRange test suite errors when memory overcommitting is turned off on Linux

2015-05-14 Thread f.heckenb...@fh-soft.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66154 --- Comment #1 from Frank Heckenbach f.heckenb...@fh-soft.de --- Somehow this got sent before the text was inserted, so here goes: Also reported on Debian, but I was asked to report it here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug

[Bug testsuite/66154] New: ReserveShadowMemoryRange test suite errors when memory overcommitting is turned off on Linux

2015-05-14 Thread f.heckenb...@fh-soft.de
Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: ---

[Bug c++/66139] New: destructor not called for members of partially constructed anonymous struct/array

2015-05-13 Thread f.heckenb...@fh-soft.de
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Target Milestone: --- The attached test program tries to construct various structures consisting of two members of some type a, where

[Bug c++/61122] too many initializers for NSDMI for array of unknown bound

2014-05-09 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61122 --- Comment #2 from Frank Heckenbach f.heckenb...@fh-soft.de --- If it's not allowed, it should also fail at file-scope or function-scope, shouldn't it?

[Bug c++/61122] New: too many initializers

2014-05-08 Thread f.heckenb...@fh-soft.de
: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de g++ says too many initializers for an array of vectors with initializers, but only within a struct. Not sure if it should work (I don't see why not), but it seems inconsistent that it only fails within a struct. Also, the error

[Bug c++/58399] New: explicit constructor called implicitly with empty init-list

2013-09-11 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de I think the following test should not compile, where an a object is implicitly constructed when calling foo() using its explicit constructor. struct a { explicit

[Bug libstdc++/58265] New: std::string move assignment should be noexcept

2013-08-28 Thread f.heckenb...@fh-soft.de
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de According to http://www.cplusplus.com/reference/string/string/operator=/, the std::string move assignment operator should be noexcept. #include string static_assert (std

[Bug inline-asm/57950] wrong line numbers in error messages for inline assembler statements

2013-07-22 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57950 --- Comment #4 from Frank Heckenbach f.heckenb...@fh-soft.de --- (In reply to Manuel López-Ibáñez from comment #3) (In reply to Andreas Schwab from comment #2) GCC uses the line number of the start of the asm statement, so line 8 is correct

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-22 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #5 from Frank Heckenbach f.heckenb...@fh-soft.de --- (In reply to Paolo Carlini from comment #1) Note that in 4.8.x and mainline for modern x86 and x86_64 targets we don't use /dev/urandom at all, we use __x86_rdrand. In general

[Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-22 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 --- Comment #6 from Frank Heckenbach f.heckenb...@fh-soft.de --- (In reply to Paolo Carlini from comment #3) I'm going to attach a patchlet which does the trick (fread - read) for me. Note I'm on purpose disabling the use

[Bug inline-asm/57950] New: wrong line numbers in error messages for inline assembler statements

2013-07-21 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de This was reported as Debian bug #588087 several years ago ... For error messages concerning inline assembler statements, gcc counts embedded \n

[Bug driver/57951] New: -MG doesn't work with -MD

2013-07-21 Thread f.heckenb...@fh-soft.de
Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de This was reported as Debian bug #593086 several years ago ... % gcc -MD -MG foo.c cc1: error: -MG may only be used with -M or -MM (Contents of source file don't matter.) According to the manual `-MD' is equivalent

[Bug c++/57941] New: [c++11] confusing error message with invalid constexpr constructor in template struct

2013-07-20 Thread f.heckenb...@fh-soft.de
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de % cat test.cpp template typename T struct a { int i; constexpr a (): i (b ()) { } constexpr int b () { return c (); } int c () const

[Bug c++/57943] New: [c++11] invalid decltype expression accepted in template default type

2013-07-20 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de The following program compiles and apparently defaults T as a, altough a (0) is not a valid expression. struct a { }; template typename T = decltype (a (0

[Bug libstdc++/57920] New: [c++11] Linux: std::random_device reads too much from /dev/urandom

2013-07-17 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de As the test below shows, a single invocation of std::random_device::operator() reads 4k from /dev/urandom, which is rather wasteful of the entropy collected

[Bug libstdc++/57505] New: [C++11] destructor of std::function should be noexcept

2013-06-02 Thread f.heckenb...@fh-soft.de
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Created attachment 30243 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30243action=edit Test case According to http://en.cppreference.com/w/cpp/utility/functional/function/~function

[Bug libstdc++/57505] [C++11] destructor of std::function should be noexcept

2013-06-02 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57505 --- Comment #1 from Frank Heckenbach f.heckenb...@fh-soft.de --- Created attachment 30244 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30244action=edit Test case for enable_shared_from_this The same applies to std::enable_shared_from_this.

[Bug c++/57498] New: rethrow_exception causes segfault when another exception is active and catch present

2013-06-01 Thread f.heckenb...@fh-soft.de
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Created attachment 30237 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30237action=edit Test case i486-linux-gnu g++-4.7 (Debian 4.7.2-4

[Bug c++/57499] New: ICE when noreturn destructor returns after throw with -O

2013-06-01 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Created attachment 30238 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30238action=edit Test case Got this while triaging #57498. The test program is clearly wrong

[Bug libstdc++/57228] New: [c++11] constructing shared_ptr to enable_shared_from_this-derived class from raw pointers

2013-05-09 Thread f.heckenb...@fh-soft.de
: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Created attachment 30076 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30076action=edit Test case http

[Bug c++/57153] New: [C++11] tries to use copy constructor for in-class initialized member in default constructor of template struct

2013-05-02 Thread f.heckenb...@fh-soft.de
Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: f.heckenb...@fh-soft.de Created attachment 30014 -- http://gcc.gnu.org

[Bug c++/56100] New: spurious -Wshadow warning with local variable in template class

2013-01-24 Thread f.heckenb...@fh-soft.de
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: f.heckenb...@fh-soft.de Created attachment 29268 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29268 Test case Compiling the test case

[Bug c++/56100] spurious -Wshadow warning with local variable in template class

2013-01-24 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56100 --- Comment #2 from Frank Heckenbach f.heckenb...@fh-soft.de 2013-01-24 21:25:09 UTC --- I guess many warnings can only be given correctly during instantiation because they depend on the actual arguments. But shadowing is not one of them

[Bug c++/55893] [4.7/4.8 Regression][C++11] runtime segfault with static const object with virtual destructor

2013-01-08 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55893 --- Comment #6 from Frank Heckenbach f.heckenb...@fh-soft.de 2013-01-09 04:15:35 UTC --- (In reply to comment #5) Caused by http://gcc.gnu.org/PR49673 I believe. Perhaps instead of testing whether TYPE_NEEDS_CONSTRUCTING we need

[Bug c++/55893] New: C++11: runtime segfault with static const object with virtual destructor

2013-01-06 Thread f.heckenb...@fh-soft.de
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: f.heckenb...@fh-soft.de Created attachment 29093 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29093 Test case

[Bug c++/55893] C++11: runtime segfault with static const object with virtual destructor

2013-01-06 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55893 --- Comment #1 from Frank Heckenbach f.heckenb...@fh-soft.de 2013-01-07 07:21:01 UTC --- Submitted to early. Here's the description: The attached test case segfault at runtime: % g++-4.7 -std=c++11 bug.cpp ./a.out Segmentation fault

[Bug c++/55798] New: suprious redeclaration error in for-loop

2012-12-23 Thread f.heckenb...@fh-soft.de
Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: f.heckenb...@fh-soft.de Created attachment 29035 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29035 Test case The attached example gives the error: foo.cpp: In function 'int

[Bug c++/55798] suprious redeclaration error in for-loop

2012-12-23 Thread f.heckenb...@fh-soft.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55798 --- Comment #4 from Frank Heckenbach f.heckenb...@fh-soft.de 2012-12-23 20:12:01 UTC --- (In reply to comment #3) A big note, C and C++ has different rules with respect of nameloop up with declarations in the for/if/switch statements

[Bug c++/55607] New: undefined reference with rvalue lambda at non-namespace scope

2012-12-05 Thread f.heckenb...@fh-soft.de
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: f.heckenb...@fh-soft.de Created attachment 28885 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28885 Reproducible test case Compiling