Description: support __ieee128 with C++
 .
 cbmc (5.12-4) unstable; urgency=low
 .
   * __float128 is not available on ppc64el (again)
   * Fix acceptable test input
   * Simplify big-endian byte updates
Author: Michael Tautschnig <mt@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2020-05-01

--- cbmc-5.12.orig/src/cpp/cpp_internal_additions.cpp
+++ cbmc-5.12/src/cpp/cpp_internal_additions.cpp
@@ -138,9 +138,8 @@ void cpp_internal_additions(std::ostream
 
     if(
       config.ansi_c.arch == "i386" || config.ansi_c.arch == "x86_64" ||
-      config.ansi_c.arch == "x32" || config.ansi_c.arch == "powerpc" ||
-      config.ansi_c.arch == "ppc64" || config.ansi_c.arch == "ppc64le" ||
-      config.ansi_c.arch == "ia64")
+      config.ansi_c.arch == "x32" || config.ansi_c.arch == "ia64" ||
+      config.ansi_c.arch == "powerpc" || config.ansi_c.arch == "ppc64")
     {
       // https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
       // For clang, __float128 is a keyword.
@@ -158,6 +157,12 @@ void cpp_internal_additions(std::ostream
       if(config.ansi_c.mode != configt::ansi_ct::flavourt::CLANG)
         out << "typedef long double __float128;" << '\n';
     }
+    else if(config.ansi_c.arch == "ppc64le")
+    {
+      // https://patchwork.ozlabs.org/patch/792295/
+      if(config.ansi_c.mode != configt::ansi_ct::flavourt::CLANG)
+        code += "typedef " CPROVER_PREFIX "Float128 __ieee128;\n";
+    }
 
     if(
       config.ansi_c.arch == "i386" || config.ansi_c.arch == "x86_64" ||
