Re: [RFC] c++: Allow parm use outside function body for constexpr members

2021-09-23 Thread Barrett Adair via Gcc-patches
I'm past this snag, so disregard this RFC for now. If I post again about this, it will be with a working patch. On Fri, Sep 17, 2021 at 11:15 AM Barrett Adair wrote: > The WIP attached patch attempts to enable usage of parameters' constexpr > members before the function body begins (see new test

[PATCH v6] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-21 Thread Barrett Adair via Gcc-patches
This revision adds description and ChangeLog entries. Thanks, Barrett From d256074a17f16ce5a90653e1d907a8dbc105aa43 Mon Sep 17 00:00:00 2001 From: Barrett Adair Date: Wed, 15 Sep 2021 15:26:22 -0500 Subject: [PATCH] c++: fix template instantiation comparison in redeclarations This change fixes a

[PATCH v5] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-21 Thread Barrett Adair via Gcc-patches
Thanks for the feedback. I addressed the concerns raised in the previous patch. I ran tests with this, after rebasing: ../gcc/configure --prefix=$MYPREFIX --enable-languages=c++ --enable-bootstrap --enable-checking=yes,extra --disable-multilib && make -j6 && make check I have the "expected" fail

[PATCH v4] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-17 Thread Barrett Adair via Gcc-patches
I think the patch is in good shape now, thanks for the help. canon-type*.C fail with trunk and pass with patch, dependent-name*.C are regression tests that pass with both. I removed the dg-ice from constexpr-52830.C. I didn't dig much into the churn history there, but the test code looks valid to

[RFC] c++: Allow parm use outside function body for constexpr members

2021-09-17 Thread Barrett Adair via Gcc-patches
The WIP attached patch attempts to enable usage of parameters' constexpr members before the function body begins (see new tests dependent-expr11.C and dependent-expr12.C). Unfortunately, I hit a "vexing" snag: gcc/testsuite/g++.dg/parse/ambig7.C breaks with this patch. After several hours of debug

[PATCH v3] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-13 Thread Barrett Adair via Gcc-patches
I reworked the fix today based on feedback from Jason and Jakub (thank you), and the subject line is now outdated. I added another test for a closely related bug that's also fixed here (dependent-expr11.C -- this one would even fail without the second declaration). All the new tests in the patch su

[PATCH v2] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-09-02 Thread Barrett Adair via Gcc-patches
Thanks for the feedback, Jason. Coming back to this today, The problem appears much deeper than I realized. I've attached another WIP version of the patch, including a couple of new test cases based on your feedback (for now, please excuse any misformatted dg-error comments). The dependent-name16.

[PATCH] c++: Fix cp_tree_equal for template value args using dependent sizeof/alignof/noexcept expressions

2021-08-20 Thread Barrett Adair via Gcc-patches
This patch fixes AST comparison for trailing return types using dependent sizeof/alignof/noexcept expressions as template value arguments. I believe this bug is over a decade old, hailing from GCC 4.6. I found it over 5 years ago and sat on the repro until I had time to fix it myself. The new test