File tree 2 files changed +14
-1
lines changed 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2703,7 +2703,14 @@ bool ByteCodeExprGen<Emitter>::VisitCallExpr(const CallExpr *E) {
2703
2703
return false ;
2704
2704
}
2705
2705
} else {
2706
- assert (Initializing);
2706
+ // We need the result. Prepare a pointer to return or
2707
+ // dup the current one.
2708
+ if (!Initializing) {
2709
+ if (std::optional<unsigned > LocalIndex = allocateLocal (E)) {
2710
+ if (!this ->emitGetPtrLocal (*LocalIndex, E))
2711
+ return false ;
2712
+ }
2713
+ }
2707
2714
if (!this ->emitDupPtr (E))
2708
2715
return false ;
2709
2716
}
Original file line number Diff line number Diff line change @@ -124,6 +124,12 @@ void func(void) {
124
124
result = arr * ii;
125
125
}
126
126
127
+ constexpr _Complex float getComplexFloat () {
128
+ return {1 ,2 };
129
+ }
130
+ static_assert (__real(getComplexFloat()) == 1, "");
131
+ static_assert (__imag(getComplexFloat()) == 2, "");
132
+
127
133
namespace CastToBool {
128
134
constexpr _Complex int F = {0 , 1 };
129
135
static_assert (F, " " );
You can’t perform that action at this time.
0 commit comments