[Bug tree-optimization/57236] New: Missed optimization: weird pointer update after the loop

2013-05-10 Thread petschy at gmail dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com In short: In a loop, I write to and increment a pointer in each iteration. Then, after the loop, I write to the pointer once more. I noticed that after the

[Bug tree-optimization/57236] Missed optimization: weird pointer update after the loop

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57236 --- Comment #1 from petschy at gmail dot com --- Created attachment 30089 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30089&action=edit preprocessed source

[Bug tree-optimization/57236] Missed optimization: weird pointer update after the loop

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57236 --- Comment #2 from petschy at gmail dot com --- Created attachment 30090 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30090&action=edit original source

[Bug tree-optimization/57236] Missed optimization: weird pointer update after the loop

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57236 --- Comment #3 from petschy at gmail dot com --- Created attachment 30091 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30091&action=edit 4.8.1 generated code of write2()

[Bug tree-optimization/57236] Missed optimization: weird pointer update after the loop

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57236 --- Comment #4 from petschy at gmail dot com --- Created attachment 30092 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30092&action=edit clang 3.4 generated code of write2()

[Bug tree-optimization/57244] New: Missed optimization: dead register move before noreturn fn call & unnecessary store/load or reg

2013-05-10 Thread petschy at gmail dot com
RMED Severity: minor Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com These are two separate issues, however, both occured in the same function, so I think it's simpler to re

[Bug tree-optimization/57244] Missed optimization: dead register move before noreturn fn call & unnecessary store/load of reg

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57244 --- Comment #1 from petschy at gmail dot com --- Created attachment 30093 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30093&action=edit preprocessed source

[Bug tree-optimization/57244] Missed optimization: dead register move before noreturn fn call & unnecessary store/load of reg

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57244 --- Comment #2 from petschy at gmail dot com --- Created attachment 30094 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30094&action=edit original source

[Bug tree-optimization/57244] Missed optimization: dead register move before noreturn fn call & unnecessary store/load of reg

2013-05-10 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57244 --- Comment #3 from petschy at gmail dot com --- Created attachment 30095 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30095&action=edit disassembly dump

[Bug tree-optimization/57236] Missed optimization: weird pointer update after the loop

2013-05-11 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57236 --- Comment #5 from petschy at gmail dot com --- I spotted a minor size inefficiency in the code: 0x00400720 <+32>:jle0x4007c5 <_Z6write2R6Streamj+197> 0x00400726 <+38>:mov%rdx,%rsi 0x000

[Bug c++/55097] New: typedef not recognized in templated class

2012-10-27 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55097 Bug #: 55097 Summary: typedef not recognized in templated class Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priorit

[Bug tree-optimization/57723] New: Missed optimization: recursion around empty function

2013-06-26 Thread petschy at gmail dot com
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Background: freeing nodes of a tree allocated with custom allocators. One of the allocators can't free individual pointers, so free() is NOP in that case (the whole pool will be

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-26 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #1 from petschy at gmail dot com --- Created attachment 30365 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30365&action=edit test case source

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-26 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #2 from petschy at gmail dot com --- Created attachment 30366 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30366&action=edit gcc amd64 disassembly

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-26 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #3 from petschy at gmail dot com --- Created attachment 30367 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30367&action=edit clang amd64 disassembly

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-26 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #4 from petschy at gmail dot com --- Ooops, the test case won't perform the freeing completely, since the recursive call is not inside the 'down' traversal loop, so only the first node on the given level would be recursi

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-26 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #5 from petschy at gmail dot com --- Created attachment 30368 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30368&action=edit fixed test case (correct recursive traversal)

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-27 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #7 from petschy at gmail dot com --- Is it a plausible assumption that if a function is not marked as 'noreturn' and the loop doesn't change the program's state then the loop could be optimized away? Cases: - the

[Bug tree-optimization/57723] Missed optimization: recursion around empty function

2013-06-27 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57723 --- Comment #10 from petschy at gmail dot com --- Thanks for the explanation. The multithreaded argument is sound, but then, on second thought, even in single threaded programs the state might be altered by a signal handler, or another process if

[Bug debug/53770] New: Regression: incorrect line numbers in debug info since 4.5+

2012-06-25 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53770 Bug #: 53770 Summary: Regression: incorrect line numbers in debug info since 4.5+ Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED

[Bug debug/53770] Regression: incorrect line numbers in debug info since 4.5+

2012-06-25 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53770 --- Comment #1 from petschy at gmail dot com 2012-06-25 20:29:05 UTC --- I tested on 32bit Debian Wheezy, too, with stock 4.6.3, and everything was ok. Another AMD64 Wheezy box w/ stock 4.6.3 showed the bug, with a minor variation: when the

[Bug c++/52460] New: Misleading error message with templated c++ code

2012-03-02 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52460 Bug #: 52460 Summary: Misleading error message with templated c++ code Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: minor Pr

[Bug c++/51640] New: Misleading error if the type in the catch() is ambiguous

2011-12-20 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51640 Bug #: 51640 Summary: Misleading error if the type in the catch() is ambiguous Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED

[Bug c++/51640] Misleading error if the type in the catch() is ambiguous

2011-12-20 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51640 --- Comment #1 from petschy at gmail dot com 2011-12-20 16:49:02 UTC --- Created attachment 26155 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26155 a slightly more verbose test case Extended test case with ambiguous type name in varia

[Bug c++/51640] Misleading error if the type in the catch() is ambiguous

2012-01-04 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51640 --- Comment #2 from petschy at gmail dot com 2012-01-04 20:45:00 UTC --- I pinpointed the commit that introduced the bug, using git bisect: commit 4272a2e82e431ac85afd0404d49b28043dc480ee Author: paolo Date: Fri Nov 27 10:44:49 2009 + git

[Bug c++/88493] New: Inconsistent error messages for unknown types

2018-12-14 Thread petschy at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- When compiling: 8<8<8< struct Foo; struct Bar { explicit Bar(Fooo* foo_) : m_foo{foo_} { } void Baz(F

[Bug c++/88503] New: 'invalid static_cast' error message could be more helpful

2018-12-14 Thread petschy at gmail dot com
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- class Parent; class Derived; Derived* foo(Parent* p) { return static_cast(p); } $ g++-9.0.0 -Wall -Wextra -

[Bug c++/88504] New: Inconsistent error message notes when using forward-declared type as value

2018-12-14 Thread petschy at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- struct Foo; struct Bar { Bar(Foo f_) : m_foo(f_) { } Foo m_foo; }; Foo baz1

[Bug c++/85637] New: Unneeded store of member variables in inner loop

2018-05-03 Thread petschy at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 44058 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44058&action=edit source Attached a simple Adler32 checksum class. When updating with a

[Bug c++/85640] New: Code size regression vs 7.3.1

2018-05-03 Thread petschy at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 44062 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44062&action=edit source Attached the source of a simple Adler32 checksum class. The Update() fn is 32 bytes

[Bug middle-end/85637] Unneeded store of member variables in inner loop

2018-05-03 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637 --- Comment #2 from petschy at gmail dot com --- Thanks. For non-char types, one can use __restrict on ptrs, but for chars it doesn't work, unfortunately (strict aliasing rules). Is there a way to tell the compiler that a char ptr doesn&#x

[Bug middle-end/85637] Unneeded store of member variables in inner loop

2018-05-04 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85637 --- Comment #5 from petschy at gmail dot com --- Thanks, in this specific case __restrict works indeed. On a side note, is it possible to achieve the same when a char is stored through a char* member, and also incremented? eg: if (m_cur < m_

[Bug c++/86436] New: IPA-ICF: miissed optimization at class template member functions

2018-07-08 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 44363 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44363&action=edit test case The attached source

[Bug ipa/86436] IPA-ICF: miissed optimization at class template member functions

2018-07-12 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86436 --- Comment #2 from petschy at gmail dot com --- Folding instantiations of member functions of class templates is a low hanging fruit IMHO. So if they are not handled ATM, then consider this ticket as a feature request, rather than a bug.

[Bug c++/84378] New: Misleading diagnostics when using ambiguous names for ptr to memfun args in member fn

2018-02-14 Thread petschy at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 43414 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43414&action=edit source to reprod

[Bug c++/87531] [8/9 Regression] assignment operator does nothing if performed as a call via operator=

2018-12-05 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87531 petschy at gmail dot com changed: What|Removed |Added CC||petschy at gmail dot com

[Bug c++/69673] New: Can't pass members in lambda capture list

2016-02-04 Thread petschy at gmail dot com
nt: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- struct A { int i; }; void foo(A& a) { auto l = [&a.i]() { }; } void bar(A& a) { auto& i = a.i; auto l = [&i]() { }; }

[Bug c++/69673] Can't pass members in lambda capture list

2016-02-04 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69673 --- Comment #2 from petschy at gmail dot com --- Is this an accidental omission in the std, or allowing member access would cause some trouble? Thanks, Peter

[Bug c++/79172] New: -Wunused-but-set-parameter gone nuts

2017-01-20 Thread petschy at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- I made a fresh build from the gcc 7 master branch (6f0a524c). Now my code doesn't compile: common/src/mgsnetCRSARC4Base.cpp: In constructor ‘mgs::net::CRSARC4Base::CRSARC4Base(uin

[Bug c++/79172] -Wunused-but-set-parameter gone nuts

2017-01-23 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79172 --- Comment #2 from petschy at gmail dot com --- Created attachment 40563 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40563&action=edit preprocessed source of the reduced test case

[Bug c++/79172] -Wunused-but-set-parameter gone nuts

2017-01-23 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79172 --- Comment #3 from petschy at gmail dot com --- $ g++-7.0.1 -pthread -Werror -Wall -Wextra 20170123-Wunused-but-set-parameter.cpp 20170123-Wunused-but-set-parameter.cpp: In constructor ‘CRSARC4Base::CRSARC4Base(unsigned int, unsigned int

[Bug c++/77620] Generic compile time regression of 7.0

2017-02-01 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77620 --- Comment #6 from petschy at gmail dot com --- Would it be sensible to put an extra line to the output of 'gcc/g++ -v' if the slow checks are enabled, which just states this fact / warns about (possibly mentioning the use of --enabl

[Bug c++/77456] New: Suboptimal code when returning a string generated with a constexpr fn at compile time

2016-09-02 Thread petschy at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 39541 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39541&action=edit C++ source I r

[Bug c++/77456] Suboptimal code when returning a string generated with a constexpr fn at compile time

2016-09-03 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77456 --- Comment #2 from petschy at gmail dot com --- #22141 does not mention a DSE issue, nor a segfault of the compiler, so hardly an exact duplicate.

[Bug c++/77456] Suboptimal code when returning a string generated with a constexpr fn at compile time

2016-09-03 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77456 --- Comment #5 from petschy at gmail dot com --- Sorry. Should I open dedicated bugs for them, or can you work from this single one? Though the example code would be the same. Probably I would have picked a more descriptive title mentioning the

[Bug c++/77482] New: Segfault when compiling ill-formed constexpr code

2016-09-05 Thread petschy at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 39561 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39561&action=edit C++ source In fixbuf(), the return statement is commented out at line 7

[Bug c++/77485] New: Missed dead store elimination when returning constexpr generated data

2016-09-05 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 39563 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39563&action=edit C++ source A string is gener

[Bug c++/77456] Suboptimal code when returning a string generated with a constexpr fn at compile time

2016-09-05 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77456 --- Comment #8 from petschy at gmail dot com --- I created two other bugs (bug 77482 for the segfault and bug 77485 for the DSE issue). As I noted in the latter, I'm a bit confused about the store merging, and what change Kyrill's patch

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2016-09-06 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485 --- Comment #2 from petschy at gmail dot com --- I agree that the generic case can become quite complicated: if after the memset, the individual values are written with gaps between them, or multiple contiguous chunks with gaps between them, it&#

[Bug c++/77502] New: -Wzero-as-null-pointer-constant : misleading/imprecise messages

2016-09-06 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 39575 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39575&action=edit C++ source g++-7.0.0 -Werror -Wall

[Bug c++/77502] -Wzero-as-null-pointer-constant : misleading/imprecise messages

2016-09-06 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77502 --- Comment #1 from petschy at gmail dot com --- I found another case: initializing an array of structs: struct X { const char* p; int i; }; X x[] = { { "hello", 0 }, { 0, 0 }, // !

[Bug c++/77513] New: -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null

2016-09-07 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Created attachment 39580 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39580&action=edit Preprocessed source, generated with g+

[Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null

2016-09-07 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77513 --- Comment #2 from petschy at gmail dot com --- I don't want to enable them. The problem is not with too little but too many warnings. A snippet from one of the problematic files: { NULL, NULL, false, false } is preprocess

[Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null

2016-09-16 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77513 --- Comment #5 from petschy at gmail dot com --- Some more details, hope this helps. Preprocessed one of the oddly behaving files with 5.4.1, 6.2.1 and 7.0.0, then tried to compile each preprocessed file with each compiler version. 5.4.1 warned

[Bug c++/77620] New: Generic compile time regression of 7.0

2016-09-16 Thread petschy at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- I noticed that compiling my C++ project with 7.0 at -O3 took twice as much time as before with earlier major versions. First I thought that it might be that 7.0 used more optimizations

[Bug c++/77620] Generic compile time regression of 7.0

2016-09-16 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77620 --- Comment #2 from petschy at gmail dot com --- Thanks, --enable-checking=release did the trick. Those unreleased checks definitely have some runtime cost :) My project was built in 3m35 with -O3, and the gcc master branch: 7.0.0 -O0

[Bug c++/77787] New: segfault in mangle.c

2016-09-28 Thread petschy at gmail dot com
: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Target Milestone: --- Background: while trying to put cold data to a dedicated section I managed to crash the compiler. The idea was that rarely used strings, eg src file names and expressions of assertions will be separated

[Bug c++/77787] segfault in mangle.c

2016-09-28 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77787 --- Comment #1 from petschy at gmail dot com --- That last function in json.hpp was gutted: //template int foo(int div_) { ASSERT(div_ == 0); return 0; } Removed the assertions from all the template functions, as this moved the

[Bug c++/60625] New: attributes on template member function definition inside class definition not supported

2014-03-23 Thread petschy at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com struct Foo { template // error: attributes are not allowed on a function-definition static int Bar() __attribute__

[Bug c++/60625] attributes on template member function definition inside class definition not supported

2014-03-23 Thread petschy at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60625 --- Comment #3 from petschy at gmail dot com --- Thanks. It's then an inconsistency, right? Because the non-template fn def didn't trigger the error while the template version did so. Moreover, the error message is misleading, becau

[Bug c++/64446] New: Misleading error message when inheriting from a template class w/o the template params

2014-12-30 Thread petschy at gmail dot com
Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com When compiling the under code, g++ gives a misleading error message: $ g++-5.0.0 -Wall 20141230-templ_base.cpp 20141230-templ_base.cpp:7:1

[Bug c++/64446] Misleading error message when inheriting from a template class w/o the template params

2014-12-30 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64446 --- Comment #1 from petschy at gmail dot com --- One subtlety: template struct Base3 { }; struct Foo3 : Base3 { }; In this case complaining about missing template params is probably inappropriate, since Base3<> is perfectly valid.

[Bug c++/64596] New: Friendship not recognized and template param deduction error

2015-01-14 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Explanation of the attached code: Str is a stream class, Txn is its helper, thus needs access to Str's private members. There is also a Glue class that is suppos

[Bug c++/64596] Friendship not recognized and template param deduction error

2015-01-14 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64596 --- Comment #1 from petschy at gmail dot com --- Created attachment 3 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3&action=edit code

[Bug c++/64615] New: Access level check error: g++ thinks the non default ctor is protected while its public

2015-01-15 Thread petschy at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Access level is changed from protected (base class) to public (derived class) via using declaration. The default ctor and the two overloaded

[Bug c++/64615] Access level check error: g++ thinks the non default ctor is protected while its public

2015-01-15 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64615 --- Comment #1 from petschy at gmail dot com --- Created attachment 34457 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34457&action=edit complete test case

[Bug debug/53770] Regression: incorrect line numbers in debug info since 4.5+

2015-02-09 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53770 --- Comment #3 from petschy at gmail dot com --- Tried now w/ g++ 4.9.1 (Debian 4.9.1-19), and single stepping is still wrong. The only difference is that it doesn't stop on ++f in line 30 after breaking out from the loop. However, all the

[Bug debug/53770] Regression: incorrect line numbers in debug info since 4.5+

2015-02-09 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53770 --- Comment #4 from petschy at gmail dot com --- Clarification: I double checked now, and the templated and the non-templated versions (do_print vs do_print2) are the same, with the same disassembly, only the addresses differing. This is true for

[Bug c++/64596] Friendship not recognized and template param deduction error

2015-02-16 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64596 --- Comment #3 from petschy at gmail dot com --- (In reply to Daniel Krügler from comment #2) 1) if the friend declaration is invalid in line 15, then g++ should tell me so, shouldn't it? But atm it compiles it, and the surprise comes

[Bug c/28901] -Wunused-variable ignores unused const initialised variables

2014-10-22 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901 petschy at gmail dot com changed: What|Removed |Added CC||petschy at gmail dot com

[Bug c++/63657] New: [4.9 regression] -Wunused-variable: warning supressed by virtual dtor fn

2014-10-27 Thread petschy at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com The under code has two unused variables, which are references to classes. We should have two warnings, however 4.9.1 and 5.0 trunk gives just one. 4.7.2

[Bug c++/63657] [4.9 regression] -Wunused-variable: warning supressed by virtual dtor

2014-10-28 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63657 --- Comment #1 from petschy at gmail dot com --- Bisected the regression: commit a8b52ce38f3056e464457ba1e95efa25a8f08d07 Author: paolo Date: Wed Jun 12 21:36:36 2013 + /cp 2013-06-12 Paolo Carlini PR c++/38958

[Bug c++/63657] [4.9/5 regression] -Wunused-variable: warning supressed by virtual dtor

2014-11-03 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63657 --- Comment #4 from petschy at gmail dot com --- Sorry, but this is definitely not the same issue. Bug 38958 is about returning by value and binding to a reference. This issue is about returning a REFERENCE and binding it to a reference. No class

[Bug c++/63657] [4.9/5 regression] -Wunused-variable: warning supressed by virtual dtor

2014-11-09 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63657 petschy at gmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED

[Bug c++/64191] New: -march=native messes up dead code elimination in loop calling dtor

2014-12-05 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Without -march=native, the loops in the 3 fns are eliminated as expected, resulting in single retq's. With -march=native, the loop which calls the defined

[Bug c++/64380] New: Missed optimization: smarter dead store elimination in dtors

2014-12-22 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com Some of the stores are eliminated in dtors already, if the values are not used later. But if there are function calls after the stores, then they are not eliminated. I

[Bug c++/62062] New: Missed optimization: write ptr reloaded in each loop iteration

2014-08-08 Thread petschy at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: petschy at gmail dot com When developing a binary i/o lib, I ran into some performance degradation in the writer functions. My investigation revealed that the write pointer was loaded

[Bug c++/62062] Missed optimization: write ptr reloaded in each loop iteration

2014-08-08 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62062 --- Comment #1 from petschy at gmail dot com --- Created attachment 33274 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33274&action=edit source

[Bug c++/62062] Missed optimization: write ptr reloaded in each loop iteration

2014-08-08 Thread petschy at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62062 --- Comment #3 from petschy at gmail dot com --- (In reply to Andrew Pinski from comment #2) > Your inline asm is broken. How? In unaliased_storeb()? That's for only proving that the redundant loads/stores are not an artifact of aliasing