I tried the same compiler on Solaris 10, 11, and 11.1 and did not see a problem.
I suspect something is wrong with the compiler installation. Or possibly your computer is out of memory.
Thanks for your reply Steve,
I just ran pkg verify on every studio package I found and it showed nothing suspicious. Also, there should be plenty of memory available:
email@example.com:~ # echo ::memstat | mdb -k
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 1053671 4115 25%
ZFS File Data 2227723 8702 54%
Anon 430435 1681 10%
Exec and libs 3483 13 0%
Page cache 13969 54 0%
Free (cachelist) 26696 104 1%
Free (freelist) 406853 1589 10%
Total 4162830 16261
firstname.lastname@example.org:~ # swap -sh
total: 1.6G allocated + 105M reserved = 1.7G used, 1.7G available
So it's just me. Bummer.
1 person found this helpful
Can you compile and run "Hello, world" with no special options?
% cc hello.c
If so, another possibility is that the cc driver does not recognize the hardware and is failing on that account. (It should not crash, of course.) The -fast option requires the driver to collect data about hardware to select code generation options to pass along to the compiler components. It must do that even with the -xdryrun option.
If the compiler seems OK except for -fast, please file a bug report on the C compiler, assuming you have a Studio service contract with Oracle. You will need to provide details of the system you are on, particularly the exact chip type.
We do test on a variety of hardware, but obviously we can't test on every machine ever built.
Thanks again Steve, that's what I thought.
Compiling C/C++/Fotran code works like a charm (well, almost, see other thread that will be created by me) but I'm afraid I can't file a bug report…
Well, the -fast option is normally used only as a starting point for finding the best optimization options. You look at the expansion of -fast (via the -v or -xdryrun option) and experiment with variations of those to find the best performance of the application on a specific target system.
You would not normally use -fast uncritically, since the application might run better with different options, and because the code generation will be turned for a specific machine class. You often get equally good results using only the more generic optimization options, and the resulting binary will also run well on other systems. For example, tuning the -xcache or -xchip options might squeeze out a percent more speed, but using -xipo can get you 15% more.
The C Users Guide describes the expansion of -fast, and if you know the characteristics of the target machine, you can specify those options directly on the command line.
No idea what was changed, but -fast works now:
$ cc -fast -dryrun
### cc: Note: NLSPATH = /opt/solarisstudio12.3/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/solarisstudio12.3/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
### command line files and options (expanded):
### -xO5 -xchip=ivybridge -xcache=32/64/8/2:256/64/8/2:3072/64/12/4 -xarch=avx_i -xdepend=yes -fsimple=2 -fns=yes -ftrap=%none -xlibmil -xlibmopt -xbuiltin=%all -D__MATHERR_ERRNO_DONTCARE -fsingle -xalias_level=basic -nofstore -xregs=frameptr -dryrun
usage: cc [ options ] files. Use 'cc -flags' for details