On 1/23/19 9:26 AM, Ramana Radhakrishnan wrote:
On Wed, Jan 23, 2019 at 1:54 PM Jason Merrill <ja...@redhat.com> wrote:
Since in r265788 I made cxx_eval_outermost_constant_expr more insistent that
the returned value have the right type, it became more important that
initialized_type be correct. These two PRs were cases of it giving the wrong
answer. On ARM, a constructor returns a pointer to the object, but
initialized_type should return the class type, not that pointer type. And we
need to look through COMPOUND_EXPR.
I tested that this fixes one of the affected testcases on ARM, and causes no
regressions on x86_64-pc-linux-gnu. I haven't been able to get a cross
toolchain to work properly; currently link tests are failing with
undefined __sync_synchronize. Applying to trunk.
rearnsha pointed this out to me - You probably need this with newlib
and it looks like the patch dropped between the cracks :(
https://sourceware.org/ml/newlib/2015/msg00653.html
I'll try and dust this off in the coming week.
Thanks, but compiling that fails for me with
sync_synchronize.s: Error: unaligned opcodes detected in executable segment
Would it also work to configure for a more specific target than arm-eabi?
Jason