On Wed, Jun 21, 2017 at 6:32 AM, Jakub Jelinek wrote:
> The following patch fixes it by allowing that wording too on the line 10.
> Is this ok for trunk or do you have some other preference?
OK, thanks.
Jason
On Tue, Jun 20, 2017 at 09:45:10PM +0200, Andreas Schwab wrote:
> On Jun 20 2017, Jason Merrill wrote:
>
> > On Tue, Jun 20, 2017 at 5:40 AM, Andreas Schwab wrote:
> >> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for errors, line 10)
> >> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++1
On Jun 20 2017, Jason Merrill wrote:
> On Tue, Jun 20, 2017 at 5:40 AM, Andreas Schwab wrote:
>> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for errors, line 10)
>> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for excess errors)
>> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c+
On Tue, Jun 20, 2017 at 5:40 AM, Andreas Schwab wrote:
> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for errors, line 10)
> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for excess errors)
> FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++14 (test for errors, line 10)
> FAIL: g++.
FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for errors, line 10)
FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++11 (test for excess errors)
FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++14 (test for errors, line 10)
FAIL: g++.dg/cpp0x/constexpr-cast.C -std=c++14 (test for excess errors)
The testcase successfully compiles, but then fails to link because
we've optimized away the declaration of the variable. We catch this
in potential_constant_expression_1, but this path wasn't calling it.
Fixed on trunk by always calling that function, not just in templates.
With that change, I ne