[Bug c/90864] New: Suboptimal codegen of structs in C/C++on x86_64

2019-06-12 Thread jaak at ristioja dot ee
: c Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee Target Milestone: --- I found two issues with handling of structures, which might be related. Given structures like this: struct X { char v; }; struct X2 { X x; char v; }; struct X3 { X2 x2

[Bug c++/85731] New: [8/9 Regression] Inner class method declaration changes meaning of outer template class template method

2018-05-10 Thread jaak at ristioja dot ee
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee Target Milestone: --- The following code compiles with GCC 7.3.0 and earlier, but errors with GCC 8.1.0

[Bug c++/84832] New: Base class member function incorrectly introduced by using-declarator

2018-03-12 Thread jaak at ristioja dot ee
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee Target Milestone: --- struct Base { template void f(T &&) const {} }; struct Derived: Base { template void f(T &&) con

[Bug middle-end/70047] Warn on inefficient function parameter passing

2017-09-28 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70047 --- Comment #2 from Jaak Ristioja --- Perhaps the simplest example for x86_64 would be something like: void f(long a1, long a2, long a3, long a4, long a5, long a6, long a7); According to the ABI all seven arguments are classified as

[Bug middle-end/70100] [5 Regression] ICE: in execute, at cfgexpand.c:6066

2017-08-08 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70100 --- Comment #3 from Jaak Ristioja --- (In reply to Markus Trippelsdorf from comment #1) > template struct K { > using CmdSP = std::D; > template void operator()(Args... args) { > using MakeFunc = CmdSP(...); > MakeFunc makeFuncs; >

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

2017-05-10 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66139 Jaak Ristioja changed: What|Removed |Added CC||jaak at ristioja dot ee --- Comment #9

[Bug c++/71568] Inexplicable error: "X is inaccessible within this context" for a public member

2017-02-23 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71568 --- Comment #1 from Jaak Ristioja --- After trying to minimize the code, this still seems to trigger the same error: #include template using whatever = void; template struct has_f; template struct has_f

[Bug c++/70808] Spurious -Wzero-as-null-pointer-constant for nullptr_t

2016-10-04 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70808 Jaak Ristioja changed: What|Removed |Added CC||jaak at ristioja dot ee --- Comment #1

[Bug c++/71189] New: ICE with VLA with second dimension from a function call expression

2016-05-18 Thread jaak at ristioja dot ee
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee Target Milestone: --- Code: int f() { int f[0][f()] = {}; } Both gcc and g++ versions 5.3.0 (in make_decl_rtl, at varasm.c:1313) 4.9.3 (in make_decl_rtl

[Bug c++/70414] Function declaration in other scope: type safety violation

2016-04-07 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70414 Jaak Ristioja changed: What|Removed |Added CC||jaak at ristioja dot ee --- Comment #3

[Bug c++/70576] G++ compiles and links invalid code when shadowing global function in function scope

2016-04-07 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70576 Jaak Ristioja changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/70576] New: G++ compiles and links invalid code when shadowing global function in function scope

2016-04-07 Thread jaak at ristioja dot ee
Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee Target Milestone: --- int foo() { return 2; } int main() { int& foo(); foo() = 42; // Segfault } First detected here: h

[Bug c++/55914] [C++11] Pack expansion fails in lambda expressions

2016-03-29 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55914 Jaak Ristioja changed: What|Removed |Added CC||jaak at ristioja dot ee --- Comment #9

[Bug middle-end/70047] New: Warn on inefficient function parameter passing

2016-03-02 Thread jaak at ristioja dot ee
Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee Target Milestone: --- According to the x86_64 ABI [1], function arguments are passed using registers and stack memory. It might be useful for x86_64 and other architectures if GCC would

[Bug libstdc++/60421] std::this_thread::sleep_for doesn't sleep for all arguments

2015-03-26 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60421 Jaak Ristioja jaak at ristioja dot ee changed: What|Removed |Added Status|RESOLVED|REOPENED

[Bug libstdc++/60421] std::this_thread::sleep_for doesn't sleep for all arguments

2015-03-26 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60421 --- Comment #5 from Jaak Ristioja jaak at ristioja dot ee --- (In reply to Jonathan Wakely from comment #4) Fixed for gcc5. Looking at the diff thread of revision 221708, I fail to see how the if (__rtime = __rtime.zero()) return; check

[Bug libstdc++/62154] New: std::throw_with_nested should not require a polymorphic type

2014-08-15 Thread jaak at ristioja dot ee
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee #include exception struct E { E(int) {} }; int main() { std::throw_with_nested(E(42)); return 0; } Compiling with g++ -std=c++11 -Wall -Wextra. Tried with GCC

[Bug c++/61067] New: [C++11] Explicit destructor declaration without exception-specification gets invalid exception-specification

2014-05-05 Thread jaak at ristioja dot ee
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee $ cat test.cpp struct Base { virtual ~Base() noexcept; }; struct A { ~A(); }; // Should mean noexcept

[Bug c++/57887] nested non-type template parameters not declared in this scope

2014-04-02 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57887 Jaak Ristioja jaak at ristioja dot ee changed: What|Removed |Added CC||jaak at ristioja

[Bug libstdc++/60421] New: std::this_thread::sleep_for doesn't sleep for all arguments

2014-03-05 Thread jaak at ristioja dot ee
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee #include chrono #include limits #include thread int main() { std::this_thread::sleep_for(std::chrono::durationuint64_t(std::numeric_limitsuint64_t::max

[Bug libstdc++/54316] [C++11] move constructor for string_stream

2013-11-29 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316 Jaak Ristioja jaak at ristioja dot ee changed: What|Removed |Added CC||jaak at ristioja

[Bug c++/58841] New: std::bad_alloc not thrown with -fsanitize=address

2013-10-22 Thread jaak at ristioja dot ee
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaak at ristioja dot ee I found this bug after a NULL pointer dereference: // test.cpp int main() { return (new char[8010463299950541741]) != 0; } $ g++-4.8.1 -fsanitize=address test.cpp -o test ./test ; echo

[Bug other/55530] New: Visibility warning not always shown

2012-11-29 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55530 Bug #: 55530 Summary: Visibility warning not always shown Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: minor

[Bug other/55530] Visibility warning not always shown

2012-11-29 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55530 --- Comment #1 from Jaak Ristioja jaak at ristioja dot ee 2012-11-29 13:37:29 UTC --- Sorry, the minimal testcase should have been: struct __attribute__ ((visibility(internal))) A {}; struct B { A * a; }; /* warning: 'B' declared

[Bug c/35634] [4.6/4.7/4.8 Regression] operand of pre-/postin-/decrement not promoted

2012-11-19 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35634 Jaak Ristioja jaak at ristioja dot ee changed: What|Removed |Added CC||jaak

[Bug c/50865] New: Invalid code generation for INT64_MIN % -1 on x86_64

2011-10-25 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50865 Bug #: 50865 Summary: Invalid code generation for INT64_MIN % -1 on x86_64 Classification: Unclassified Product: gcc Version: 4.5.3 Status: UNCONFIRMED Severity: blocker

[Bug c/50865] Invalid code generation for INT64_MIN % 1 on x86_64

2011-10-25 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50865 --- Comment #1 from Jaak Ristioja jaak at ristioja dot ee 2011-10-25 14:30:41 UTC --- Compiled with clang 2.9, the code runs correctly.

[Bug tree-optimization/50865] Invalid code generation for INT64_MIN % 1 on x86_64

2011-10-25 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50865 --- Comment #7 from Jaak Ristioja jaak at ristioja dot ee 2011-10-25 16:08:19 UTC --- (In reply to comment #6) /* X % -Y is the same as X % Y. */ (fold-const.c:fold_binary_loc) would probably be what's wrong here. On the other hand

[Bug tree-optimization/50865] Invalid code generation for INT64_MIN % 1 on x86_64

2011-10-25 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50865 --- Comment #9 from Jaak Ristioja jaak at ristioja dot ee 2011-10-25 16:37:48 UTC --- (In reply to comment #8) Well, they are equivalent where they are both defined, or if you apply C99 rules to infinite-precision integers. The problem here

[Bug other/49658] New: Typo in gcc/doc/extend.texi

2011-07-06 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49658 Summary: Typo in gcc/doc/extend.texi Product: gcc Version: unknown Status: UNCONFIRMED Severity: trivial Priority: P3 Component: other AssignedTo:

[Bug other/49658] Typo in gcc/doc/extend.texi

2011-07-06 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49658 --- Comment #1 from Jaak Ristioja jaak at ristioja dot ee 2011-07-06 10:26:24 UTC --- Heh sry. I also made a typo. The text SHOULD contain are instead of are is. PS: The bugzilla might need a Documentation component for gcc.

[Bug rtl-optimization/42621] [4.4 Regression] Computed gotos on AMD 800% slower

2011-06-10 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621 Jaak Ristioja jaak at ristioja dot ee changed: What|Removed |Added CC||jaak at ristioja

[Bug rtl-optimization/42621] [4.4 Regression] Computed gotos on AMD 800% slower

2011-06-10 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621 --- Comment #13 from Jaak Ristioja jaak at ristioja dot ee 2011-06-10 08:52:47 UTC --- (In reply to comment #12) PPS: As noted by other, this bug is likely a duplicate to bug 39284 and bug 43868. As noted by others, this bug is likely

[Bug c/43686] GCC doesn't duplicate computed gotos for functions marked as hot

2011-06-10 Thread jaak at ristioja dot ee
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43686 --- Comment #3 from Jaak Ristioja jaak at ristioja dot ee 2011-06-10 09:19:49 UTC --- (In reply to comment #1) Duplicate of PR42621? And probably a duplicate of bug 39284 also. (In reply to comment #2) yes. It's definitely the same issue