aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-01-07 23:00:28 +0100
committerJakub Jelinek <jakub@redhat.com>2021-01-07 23:00:28 +0100
commitaa4db31dd2a99b4c902f2a3ac6ef4397f84dd888 (patch)
tree450bf667833ec15b6010796669c34dbb069cedf2 /gcc/fortran
parent178f0afce3611282170de380fcea9db9d6e3ff0c (diff)
downloadgcc-aa4db31dd2a99b4c902f2a3ac6ef4397f84dd888.zip
gcc-aa4db31dd2a99b4c902f2a3ac6ef4397f84dd888.tar.gz
gcc-aa4db31dd2a99b4c902f2a3ac6ef4397f84dd888.tar.bz2
c++: Fix up tsubst of BIT_CAST_EXPR [PR98329]
As the testcase shows, calling cp_build_bit_cast in tsubst_copy doesn't seem to be a good idea, because tsubst_copy might not really make the operand non-dependent, but as processing_template_decl can be 0, type_dependent_expression_p will return false and then cp_build_bit_cast assumes the type is non-NULL and non-dependent. So, this patch just follows what is done e.g. for NOP_EXPR etc. and just builds some tree in tsubst_copy, and only calls the semantics.c function from tsubst_copy_and_build. 2021-01-07 Jakub Jelinek <jakub@redhat.com> PR c++/98329 * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set its location. (tsubst_copy_and_build): Handle BIT_CAST_EXPR. * g++.dg/cpp2a/bit-cast10.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions