[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-11-01 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 qinzhao at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-11-01 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #18 from qinzhao at gcc dot gnu.org --- fixed

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-11-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #17 from CVS Commits --- The master branch has been updated by Qing Zhao : https://gcc.gnu.org/g:429e3b7d8bf6609ddf7c7b1e49244997e9ac76b8 commit r12-4829-g429e3b7d8bf6609ddf7c7b1e49244997e9ac76b8 Author: Oracle Public Cloud User

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-25 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #16 from qinzhao at gcc dot gnu.org --- Created attachment 51662 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51662=edit proposed patch to gcc12

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-15 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #15 from qinzhao at gcc dot gnu.org --- A summary of this bug based on discussion and more study: multiple issues in the current implemenation: A. should check is_gimple_reg before adding the call to __builtin_clear_padding;

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-13 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #14 from qinzhao at gcc dot gnu.org --- All the 3 testing cases can be resolved by adding the following patch (check whether the type has padding before adding call to __builtin_clear_padding): I believe that this is a safe partial

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #13 from David Binderman --- Created attachment 51593 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51593=edit C++ source code Third test case.

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-12 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #12 from qinzhao at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #8) > and if you have a variable that isn't addressable, you need to figure out > what to do. I think it might be easiest not to clear anything, another

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-12 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #11 from qinzhao at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #8) > Sure, you can, but just note that it is conservative and fast, it will > return true even for types that don't have any padding. > But for double,

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-11 Thread qing.zhao at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #10 from Qing Zhao --- > On Oct 11, 2021, at 3:29 PM, jakub at gcc dot gnu.org > wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 > > --- Comment #8 from Jakub Jelinek --- > (In reply to qinzhao from comment #7)

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-11 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #9 from David Binderman --- Created attachment 51587 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51587=edit C++ source code Another test case derived from compiling fedora source code.

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-11 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #8 from Jakub Jelinek --- (In reply to qinzhao from comment #7) > I agree that the above additional check is necessary. > > one question here is, can I use the routine "bool > clear_padding_type_may_have_padding_p (tree type)" in

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-10-11 Thread qinzhao at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #7 from qinzhao at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #2) > __builtin_clear_padding when folded emits a series of memory stores rather > than BIT_INSERT_EXPR etc., so that wouldn't work. > But, IMNSHO,

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-09-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #6 from Jakub Jelinek --- (In reply to rguent...@suse.de from comment #5) > But then we still cannot do the GIMPLE this way. It's a case where > it is problematic to mark something as address-taken when some > gimplification

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-09-13 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #5 from rguenther at suse dot de --- On Mon, 13 Sep 2021, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 > > --- Comment #4 from Jakub Jelinek --- > (In reply to rguent...@suse.de from

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-09-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #4 from Jakub Jelinek --- (In reply to rguent...@suse.de from comment #3) > > I doubt we support vectors of long double, so it is mainly whether > > returning of > > long double or _Complex long double works fine. > > for this

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-09-13 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #3 from rguenther at suse dot de --- On Mon, 13 Sep 2021, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 > > --- Comment #2 from Jakub Jelinek --- > __builtin_clear_padding when folded emits

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-09-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 --- Comment #2 from Jakub Jelinek --- __builtin_clear_padding when folded emits a series of memory stores rather than BIT_INSERT_EXPR etc., so that wouldn't work. But, IMNSHO, -ftrivial-auto-var-init* shouldn't be adding __builtin_clear_padding

[Bug c++/102281] -ftrivial-auto-var-init=zero causes ice

2021-09-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|