Skip to content

Commit

Permalink
Also drop complex attribute in typeOfReal
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Jan 15, 2020
1 parent 60d0851 commit 9a62a24
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,9 @@ let typeOfReal t =
| FComplexFloat -> FFloat
| FComplexDouble -> FDouble
| FComplexLongDouble -> FLongDouble
in TFloat (newfkind fkind, attrs)
in
let newattrs = dropAttribute "complex" attrs in
TFloat (newfkind fkind, newattrs)
| _ -> E.s (E.bug "unexpected non-numerical type for argument to __real__")

let var vi : lval = (Var vi, NoOffset)
Expand Down Expand Up @@ -3001,9 +3003,6 @@ let initGccBuiltins () : unit =
H.add h "__builtin_ctzl" (intType, [ ulongType ], false);
H.add h "__builtin_ctzll" (intType, [ ulongLongType ], false);

(* Do sth smart here, such as add a spurious cast to void *)
(* H.add h "__builtin_classify_type" (intType, [ voidType], false); *)

H.add h "__builtin_exp" (doubleType, [ doubleType ], false);
H.add h "__builtin_expf" (floatType, [ floatType ], false);
H.add h "__builtin_expl" (longDoubleType, [ longDoubleType ], false);
Expand Down

0 comments on commit 9a62a24

Please sign in to comment.