File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1465,7 +1465,7 @@ bool X86TargetInfo::validateAsmConstraint(
14651465 }
14661466 case ' f' : // Any x87 floating point stack register.
14671467 // Constraint 'f' cannot be used for output operands.
1468- if (Info.ConstraintStr [0 ] == ' =' )
1468+ if (Info.ConstraintStr [0 ] == ' =' || Info. ConstraintStr [ 0 ] == ' + ' )
14691469 return false ;
14701470 Info.setAllowsRegister ();
14711471 return true ;
Original file line number Diff line number Diff line change @@ -204,6 +204,12 @@ double f_output_constraint(void) {
204204 return result ;
205205}
206206
207+ double f_output_constraint_2 (void ) {
208+ double result ;
209+ __asm("foo1" : "+f" (result )); // expected-error {{invalid output constraint '+f' in asm}}
210+ return result ;
211+ }
212+
207213void fn1 (void ) {
208214 int l ;
209215 __asm__(""
You can’t perform that action at this time.
0 commit comments