Developer Studio C/C++/Fortran Compilers


Developer Studio 12.6 beta: hardware capability (CA_SUNW_HW_1) unsupported: 0x10000000  [ CBCOND ]


I have a testcase that fails with the above message at runtime if I compile it with -xO4 optimization level. If I compile it with -xO1, it runs the way I would expect. I'm sorry this testcase is a little larger than I would like it to be. I didn't have time to reduce it and I thought I should report this as soon as I could. [kennedy#scalp 12sana]$ CC -m32 -D_RWCONFIG=12sana -xO4 -xbuiltin=%all -xlibmil  -errtags -erroff nonpodvarargw -errwarn=%all -mt   -c  spro_limits.cpp[kennedy#scalp 12sana]$ CC -m32 -xO4  -mt    -o spro_limits  spro_limits.o -lpthread [kennedy#scalp 12sana]$ ./spro_limitsld.so.1: spro_limits: fatal: spro_limits: hardware capability (CA_SUNW_HW_1) unsupported: 0x10000000  [ CBCOND ]Killed  [kennedy#scalp 12sana]$ CC -m32 -D_RWCONFIG=12sana -xO1 -xbuiltin=%all -xlibmil  -errtags -erroff nonpodvarargw -errwarn=%all -mt   -c  spro_limits.cpp[kennedy#scalp 12sana]$ CC -m32 -xO1  -mt    -o spro_limits  spro_limits.o -lpthread [kennedy#scalp 12sana]$ ./spro_limits/**/#undef RW_LIMITS#define RW_ILP32LL#define RW_CHAR_MAX '\x7f'#define RW_CHAR_MIN (-RW_CHAR_MAX - 1)#define RW_SCHAR_MAX 0x7f#define RW_SCHAR_MIN (-RW_SCHAR_MAX - 1)#define RW_UCHAR_MAX 0xffU#define RW_UCHAR_MIN 0x0U#define RW_SHORT_MAX 0x7fff#define RW_SHORT_MIN (-RW_SHORT_MAX - 1)#define RW_USHORT_MAX 0xffffU#define RW_USHORT_MIN 0x0U#define RW_INT_MAX 0x7fffffff#define RW_INT_MIN (-RW_INT_MAX - 1)#define RW_UINT_MAX 0xffffffffU#define RW_UINT_MIN 0x0U#define RW_LONG_MAX 0x7fffffffL#define RW_LONG_MIN (-RW_LONG_MAX - 1L)#define RW_ULONG_MAX 0xffffffffUL#define RW_ULONG_MIN 0x0UL#define RW_LLONG_MAX 0x7fffffffffffffffLL#define RW_LLONG_MIN (-RW_LLONG_MAX - 1LL)#define RW_ULLONG_MAX 0xffffffffffffffffULL#define RW_ULLONG_MIN 0x0ULL#define RW_WCHAR_T_MAX 0x7fffffff#define RW_WCHAR_T_MIN (-RW_WCHAR_T_MAX - 1)#define RW_SIZE_MAX 0xffffffffU#define RW_SIZE_MIN 0x0U#define RW_DBL_DIG 15#define RW_DBL_MANT_DIG 53#define RW_DBL_MAX_10_EXP 308#define RW_DBL_MAX_EXP 1024#define RW_DBL_MIN_10_EXP -307#define RW_DBL_MIN_EXP -1021#define RW_DECIMAL_DIG 36#define RW_FLT_DIG 6#define RW_FLT_MANT_DIG 24#define RW_FLT_MAX_10_EXP 38#define RW_FLT_MAX_EXP 128#define RW_FLT_MIN_10_EXP -37#define RW_FLT_MIN_EXP -125#define RW_FLT_RADIX 2#define RW_LDBL_DIG 33#define RW_LDBL_MANT_DIG 113#define RW_LDBL_MAX_10_EXP 4932#define RW_LDBL_MAX_EXP 16384#define RW_LDBL_MIN_10_EXP -4931#define RW_LDBL_MIN_EXP -16381#define RW_DBL_MAX 1.7976931348623157081452E+308#define RW_FLT_MAX 3.4028234663852885981170E+38F#define RW_LDBL_MAX 1.189731495357231765085759326628007016E+4932L#define RW_DBL_EPSILON 2.2204460492503130808473E-16#define RW_DBL_MIN 2.2250738585072013830903E-308#define RW_FLT_EPSILON 1.1920928955078125000000E-07F#define RW_FLT_MIN 1.1754943508222875079688E-38F#define RW_LDBL_EPSILON 1.925929944387235853055977942584927319E-34L#define RW_LDBL_MIN 3.362103143112093506262677817321752603E-4932L //spro_limits.cpp:#include <limits>#include <limits.h>#include <float.h>#include <stdio.h>    // for printf()#include <stdlib.h>   // for strtod() // volatile to foil aggressive optimizersvolatile int zero            = 0;volatile int one             = zero + 1;volatile int two             = one + 1; template<class T>void print_limit (T n, const char *pfx, const char *sfx,                  bool is_max, const char *type){    char nstr [64] = { 0 };    char* pnstr = nstr + sizeof nstr - 2;    const char digit [] = {        '0','1','2','3','4','5','6','7','8','9', 'a', 'b', 'c', 'd', 'e', 'f'    };    if (is_max || n >= zero) {        T tnstr = n;        *--pnstr = digit [tnstr % 16];        while (tnstr /= 16)            *--pnstr = digit [tnstr % 16];    }    *--pnstr = 'x';     if (   'c' == type [0]        && 'h' == type [1]        && 'a' == type [2]        && 'r' == type [3]        && '\0' == type [4]) {        *--pnstr = '\\';        *--pnstr = '\'';        nstr [sizeof nstr - 2] = '\'';    }    else {        *--pnstr = '0';    }     if (is_max) {        printf ("#define RW_%s_MAX %s%s", pfx, pnstr, sfx);    }    else {        if (n < zero) {            printf ("#define RW_%s_MIN (-RW_%s_MAX - 1%s)",                    pfx, pfx, sfx);        }        else {            printf ("#define RW_%s_MIN %s%s", pfx, pnstr, sfx);        }    }    printf ("\n");}    template <class T>const char* type_name (T) { return "unknown type"; }  const char* type_name (short) { return "short"; }const char* type_name (unsigned short) { return "unsigned short"; }const char* type_name (int) { return "int"; }const char* type_name (unsigned int) { return "unsigned int"; }const char* type_name (long) { return "long"; }const char* type_name (unsigned long) { return "unsigned long"; } const char* type_name (long long) { return "long long"; }const char* type_name (unsigned long long) { return "unsigned long long"; } template <class T>const char* type_suffix (T) { return ""; } const char* type_suffix (short) { return ""; }const char* type_suffix (unsigned short) { return "U"; }const char* type_suffix (int) { return ""; }const char* type_suffix (unsigned int) { return "U"; }const char* type_suffix (long) { return "L"; }const char* type_suffix (unsigned long) { return "UL"; } const char* type_suffix (long long) { return "LL"; }const char* type_suffix (unsigned long long) { return "ULL"; } template <class T>void print_limits (const char *pfx, const char *sfx, const char *type){    print_limit (std::numeric_limits<T>::max(), pfx, sfx, true, type);    print_limit (std::numeric_limits<T>::min(), pfx, sfx, false, type);} template <class FloatT>void print_float (FloatT x, const char *xstr,                  const char *macro_name, const char *fmt, int prec){    if ('-' == *xstr || ('0' <= *xstr && '9' >= *xstr)) {        printf ("#define %s %s", macro_name, xstr);    }    else {        printf ("#define %s ", macro_name);        printf (fmt, prec + 2, x);    }    printf ("\n");} #define DO_STRINGIFY(x)  #x#define STRINGIFY(x)     DO_STRINGIFY  #define PRINTFLT(x, fmt, prec, suffix) \    print_float (x, STRINGIFY (x), "RW_" #x, "%.*" fmt "e" suffix, prec) #define SIZEOF(T)   unsigned (sizeof (T)) template <size_t S, size_t I, size_t L, size_t LL, size_t P>struct DataModel; template <size_t LL>struct DataModel<2, 2, 4, LL, 4>{    static const char* name() { return "LP32"; }}; template <size_t LL>struct DataModel<2, 4, 4, LL, 4>{    static const char* name() { return "ILP32"; }}; template <>struct DataModel<2, 4, 4, 8, 4>{    static const char* name() { return "ILP32LL"; }}; template <>struct DataModel<2, 4, 4, 8, 8>{    static const char* name() { return "LLP64"; }}; template <size_t LL>struct DataModel<2, 4, 8, LL, 8>{    static const char* name() { return "LP64"; }}; template <>struct DataModel<2, 4, 8, 8, 8>{    static const char* name() { return "LP64LL"; }}; template <size_t LL>struct DataModel<2, 8, 8, LL, 8>{    static const char* name() { return "ILP64"; }}; const char*data_model(){    return DataModel<sizeof(short), sizeof(int), sizeof(long),                     sizeof(long long), sizeof(void*)>::name();} voidcompute_platform(){    printf ("#define RW_%s\n", data_model());} int main (){    printf ("/**/\n#undef RW_LIMITS\n");    compute_platform (); #define MKLIMITS(T, pfx, sfx, type) \      print_limits<T> (pfx, sfx, type);     MKLIMITS (char, "CHAR", "", "char");    MKLIMITS (signed char, "SCHAR", "", "signed char");    MKLIMITS (unsigned char, "UCHAR", "U", "unsigned char");     MKLIMITS (short, "SHORT", "", "short");    MKLIMITS (unsigned short, "USHORT", "U", "unsigned short");     MKLIMITS (int, "INT", "", "int");    MKLIMITS (unsigned int, "UINT", "U", "unsigned int");     MKLIMITS (long, "LONG", "L", "long");    MKLIMITS (unsigned long, "ULONG", "UL", "unsigned long"); #    define LLong long long     MKLIMITS (LLong, "LLONG", "LL", "long long");    MKLIMITS (unsigned LLong, "ULLONG", "ULL", "unsigned long long");     const char *suffix = "U";    if ((wchar_t)~0 < (wchar_t)0)        suffix = "";     MKLIMITS (wchar_t, "WCHAR_T", suffix, "wchar_t");     // compute the maximum and minimum for size_t and ptrdiff_t    MKLIMITS (size_t, "SIZE",                    type_suffix (sizeof (int)),                    type_name (sizeof (int)));     //////////////////////////////////////////////////////////////////    // compute floating point limits  #if !defined (DBL_DIG)#  define DBL_DIG   15#endif   // DBL_DIG     printf ("#define RW_DBL_DIG %d\n", DBL_DIG); #if defined (DBL_MANT_DIG)    printf ("#define RW_DBL_MANT_DIG %d\n", DBL_MANT_DIG);#endif   // DBL_MANT_DIG #if defined (DBL_MAX_10_EXP)    printf ("#define RW_DBL_MAX_10_EXP %d\n", DBL_MAX_10_EXP);#endif   // DBL_MAX_10_EXP #if defined (DBL_MAX_EXP)    printf ("#define RW_DBL_MAX_EXP %d\n", DBL_MAX_EXP);#endif   // DBL_MAX_EXP #if defined (DBL_MIN_10_EXP)    printf ("#define RW_DBL_MIN_10_EXP %d\n", DBL_MIN_10_EXP);#endif   // DBL_MIN_10_EXP #if defined (DBL_MIN_EXP)    printf ("#define RW_DBL_MIN_EXP %d\n", DBL_MIN_EXP);#endif   // DBL_MIN_EXP #if defined (DECIMAL_DIG)    printf ("#define RW_DECIMAL_DIG %d\n", DECIMAL_DIG);#endif   // DECIMAL_DIG #if !defined (FLT_DIG)#  define FLT_DIG   6#endif   // FLT_DIG     printf ("#define RW_FLT_DIG %d\n", FLT_DIG); #if defined (FLT_MANT_DIG)    printf ("#define RW_FLT_MANT_DIG %d\n", FLT_MANT_DIG);#endif   // FLT_MANT_DIG #if defined (FLT_MAX_10_EXP)    printf ("#define RW_FLT_MAX_10_EXP %d\n", FLT_MAX_10_EXP);#endif   // FLT_MAX_10_EXP #if defined (FLT_MAX_EXP)    printf ("#define RW_FLT_MAX_EXP %d\n", FLT_MAX_EXP);#endif   // FLT_MAX_EXP #if defined (FLT_MIN_10_EXP)    printf ("#define RW_FLT_MIN_10_EXP %d\n", FLT_MIN_10_EXP);#endif   // FLT_MIN_10_EXP #if defined (FLT_MIN_EXP)    printf ("#define RW_FLT_MIN_EXP %d\n", FLT_MIN_EXP);#endif   // FLT_MIN_EXP #if defined (FLT_RADIX)    printf ("#define RW_FLT_RADIX %d\n", FLT_RADIX);#endif   // FLT_RADIX #  if !defined (LDBL_DIG)#    define LDBL_DIG   31#  endif   // LDBL_DIG     printf ("#define RW_LDBL_DIG %d\n", LDBL_DIG); #  if defined (LDBL_MANT_DIG)    printf ("#define RW_LDBL_MANT_DIG %d\n", LDBL_MANT_DIG);#  endif   // LDBL_MANT_DIG #  if defined (LDBL_MAX_10_EXP)    printf ("#define RW_LDBL_MAX_10_EXP %d\n", LDBL_MAX_10_EXP);#  endif   // LDBL_MAX_10_EXP #  if defined (LDBL_MAX_EXP)    printf ("#define RW_LDBL_MAX_EXP %d\n", LDBL_MAX_EXP);#  endif   // LDBL_MAX_EXP #  if defined (LDBL_MIN_10_EXP)    printf ("#define RW_LDBL_MIN_10_EXP %d\n", LDBL_MIN_10_EXP);#  endif   // LDBL_MIN_10_EXP #  if defined (LDBL_MIN_EXP)    printf ("#define RW_LDBL_MIN_EXP %d\n", LDBL_MIN_EXP);#  endif   // LDBL_MIN_EXP #if defined (DBL_MAX)    PRINTFLT (DBL_MAX, "l", DBL_DIG, "");#endif   // DBL_MAX #if defined (FLT_MAX)    PRINTFLT (FLT_MAX, "", FLT_DIG, "F");#endif   // FLT_MAX #  if defined (LDBL_MAX)    PRINTFLT (LDBL_MAX, "L", DBL_DIG, "F");#  endif   // LDBL_MAX #if defined (DBL_EPSILON)    PRINTFLT (DBL_EPSILON, "l", DBL_DIG, "");#endif   // DBL_EPSILON #if defined (DBL_MIN)    PRINTFLT (DBL_MIN, "l", DBL_DIG, "");#endif   // DBL_MIN #if defined (FLT_EPSILON)    PRINTFLT (FLT_EPSILON, "", FLT_DIG, "F");#endif   // FLT_EPSILON #if defined (FLT_MIN)    PRINTFLT (FLT_MIN, "", FLT_DIG, "F");#endif   // FLT_MIN #  if defined (LDBL_EPSILON)    PRINTFLT (LDBL_EPSILON, "L", LDBL_DIG, "L");#  endif   // LDBL_EPSILON #  if defined (LDBL_MIN)    PRINTFLT (LDBL_MIN, "L", LDBL_DIG, "L");#  endif   // LDBL_MIN     return 0;}

Related Links

Huge debugging binaries after switching from C++ Sun Studio 11 to 12u1
Solaris Studio 12.3 i386 + patches; Assertion Failed when compiling x264
RDRAND not really random with Oracle Studio 12.3 + patches
Solaris Studio i386 12.3 cc's crashes with -fast
Using isfinite on Solaris 11.1 x86 with CC from Solaris Studio 12.3
realloc() behavior and C99 compliancy
Unformatted read/write of character arrays
Oracle singleton instance issue with OCIStmtFetch()
Override compilation optimization level for a single source file?
default compiler options
Long compilation time using 5.12 CC compiler
ORA-32102: invalid OCI handle
two errors in compiling Hello by fortran
Solaris Studio 12.3 Install on Mac OS 10.8.3
PL_stack_base: relocations based on the ABS44 coding model can not be used
Openmp with Fortran 90

Categories

ORACLE DEV
Database
Globalization Support
Designer Headstart
Data Warehousing
Procurement
Communications and Media
Documentation
Content Services
Data Guard
Rules Manager & Expres...
Berkeley DB High Avail...
Web Service Manager (K...
Technical Bulletin (Ko...
JDeveloper and OC4J 11...
BI for JDE (Archived)
Sales
Hyperion BI & Applicat...
Developer Tools & APIs
SQR Reporting
General EBS Discussion
Logistics
LCM: Oracle iSetup
QA/Testing
WebLogic Server - Clus...
Packaged Applications
Communications Presence
Hyperion DRM/Analytica...
weblogic.developer.int...
bea.kodo.beta
weblogic.developer.int...
Self-Service
weblogic.developer.int...
BEA Tuxedo 10.0 Beta
ALUI CodeShare
Liquid Infrastructure ...
应用软件
Evolve
技术专区
EJB Development (Chinese)
Develop Tools (Chinese)
版务
Complex Event Processing
User Productivity Kit ...
Private Discussion For...
AIA 3.0 Early Adopters
Mobile Workforce Manag...
Annotation Processing
Java EE (Java Enterpri...
Serialization [ARCHIVE]
Java Runtime Environme...
Java Technologies for ...
Sun Update Connection
Java EE SDK
Java System Applicatio...
Debugging Tools and Te...
Bug Examples
JDeveloper&ADF (Chinese)
Workstations General D...
Java编程开发
JavaFX 2.0 and Later
R Technologies
Big Data
WebCenter Sites
Oracle Database Cloud ...
Primavera Unifier User...
Oracle Application Ser...
Oracle Servlet Develop...
Webservice(SOA) (Korean)
Daily Notifications
Resell
OpenStack on Oracle Linux
Discuss
Eloqua User Group DACH
Public Broadcasting
Webcast Central
Markies: Best Internat...
Eloqua Digital Adverti...
OTN América Latina Tou...
Eloqua 10 Product Docu...
JDBC & UCP
Orphan Threads
Oracle Process Cloud S...
SPARC Servers
Getting Started
Java Community Process
Oracle Supply Chain Ma...
Digital Learning
Supply Planning
UK Oracle User Group
Oracle EMEA Partner Sales
Article Archive
DOAG
OTN at Oracle OpenWorld
Home of Oracle Certifi...
Cloud Accelerate
Containers
Service Supply Chain
Oracle Systems Manager...
Oracle Datasource for ...
Brazil - Eloqua User G...
Database Security - Ge...
Upgrades and Migration
On Demand: E-Business ...
SQLJ/ODBC (Korean)
weblogic.developer.int...
JavaServer Faces
Patterns & OO Design
Driver Development
Linux (Japanese)

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile