diff options
author | Marek Polacek <polacek@redhat.com> | 2018-09-18 19:16:28 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2018-09-18 19:16:28 +0000 |
commit | bf8d83098ffafe1273b11eb5f4a596f96c90c42e (patch) | |
tree | 69c54203512e9f57ce7c3840298da4c7fe1adf99 /gcc/fortran/frontend-passes.c | |
parent | e8db6cd5fb1ad254329e426dcc8e958c02e2284f (diff) | |
download | gcc-bf8d83098ffafe1273b11eb5f4a596f96c90c42e.zip gcc-bf8d83098ffafe1273b11eb5f4a596f96c90c42e.tar.gz gcc-bf8d83098ffafe1273b11eb5f4a596f96c90c42e.tar.bz2 |
P1064R0 - Allowing Virtual Function Calls in Constant Expressions
P1064R0 - Allowing Virtual Function Calls in Constant Expressions
* call.c (build_over_call): No longer check if we're outside a template
function.
* class.c (build_vtbl_initializer): Build vtable's constructor with
indexes.
* constexpr.c (cxx_eval_constant_expression): Don't ignore _vptr's
initializer. Handle OBJ_TYPE_REF.
(potential_constant_expression_1): Handle OBJ_TYPE_REF.
* decl.c (maybe_commonize_var): Bail out for any DECL_ARTIFICIAL.
(initialize_artificial_var): Mark the variable as constexpr.
(grokdeclarator): Change error to pedwarn. Only warn when
pedantic and not C++2a.
* gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
* g++.dg/cpp0x/constexpr-virtual5.C: Adjust dg-error.
* g++.dg/cpp2a/constexpr-virtual1.C: New test.
* g++.dg/cpp2a/constexpr-virtual2.C: New test.
* g++.dg/cpp2a/constexpr-virtual3.C: New test.
* g++.dg/cpp2a/constexpr-virtual4.C: New test.
* g++.dg/cpp2a/constexpr-virtual5.C: New test.
* g++.dg/cpp2a/constexpr-virtual6.C: New test.
* g++.dg/cpp2a/constexpr-virtual7.C: New test.
* g++.dg/cpp2a/constexpr-virtual8.C: New test.
* g++.dg/cpp2a/constexpr-virtual9.C: New test.
* g++.dg/diagnostic/virtual-constexpr.C: Skip for C++2a. Use
-pedantic-errors. Adjust dg-error.
From-SVN: r264408
Diffstat (limited to 'gcc/fortran/frontend-passes.c')
0 files changed, 0 insertions, 0 deletions