Index: osprey/be/cg/calls.cxx
===================================================================
--- osprey/be/cg/calls.cxx	(revision 3546)
+++ osprey/be/cg/calls.cxx	(working copy)
@@ -374,7 +374,7 @@
 #ifdef TARG_X8664
   if( CG_opt_level > 0  &&
       Is_Target_32bit() &&
-      (Gen_PIC_Shared || Gen_PIC_Call_Shared)    &&
+      Gen_PIC_Shared    &&
       !PU_References_GOT ){
     TN* ebx_tn = Ebx_TN();
     REGISTER_Set_Allocatable( TN_register_class(ebx_tn),
@@ -924,7 +924,7 @@
   }
 
 #ifdef TARG_X8664
-  if( Is_Target_32bit() && (Gen_PIC_Shared || Gen_PIC_Call_Shared) ){
+  if( Is_Target_32bit() && Gen_PIC_Shared ){
     EETARG_Generate_PIC_Entry_Code( bb, &ops );
   }
 #endif
@@ -1749,7 +1749,7 @@
     EETARG_Restore_Extra_Callee_Tns (&ops);
 
 #ifdef TARG_X8664
-  if( Is_Target_32bit() && (Gen_PIC_Call_Shared || Gen_PIC_Shared) ){
+  if( Is_Target_32bit() && Gen_PIC_Shared ){
     EETARG_Generate_PIC_Exit_Code( bb_epi, &ops );
   }
 #endif
Index: osprey/be/cg/register.cxx
===================================================================
--- osprey/be/cg/register.cxx	(revision 3546)
+++ osprey/be/cg/register.cxx	(working copy)
@@ -776,7 +776,7 @@
        be used to hold the address pointing to the global offset table.
     */
     if( Is_Target_32bit() &&
-	(Gen_PIC_Shared || Gen_PIC_Call_Shared)   &&
+	Gen_PIC_Shared    &&
 	rclass == TN_register_class(ebx_tn) ){
       reg_alloc_status[rclass][TN_register(ebx_tn)] = AS_not_allocatable;
       re_init = TRUE;
Index: osprey/be/cg/x8664/expand.cxx
===================================================================
--- osprey/be/cg/x8664/expand.cxx	(revision 3546)
+++ osprey/be/cg/x8664/expand.cxx	(working copy)
@@ -9890,7 +9890,7 @@
 	         Gen_Literal_TN(4*(num_xmms-8), 4), ops);
       }
       Build_OP(TOP_neg64, r11_tn, r11_tn, ops);
-      if ( Gen_PIC_Shared || Gen_PIC_Call_Shared ) {
+      if ( Gen_PIC_Shared ) {
 	Build_OP ( TOP_lea64, rax_tn, Rip_TN(), OP_opnd( op, 4 ), ops );
 	ops->last->bb = bb; // to pass Verify_Operand
 	Build_OP ( TOP_leax64, r11_tn, r11_tn, rax_tn, 
Index: osprey/be/cg/x8664/cgemit_targ.cxx
===================================================================
--- osprey/be/cg/x8664/cgemit_targ.cxx	(revision 3546)
+++ osprey/be/cg/x8664/cgemit_targ.cxx	(working copy)
@@ -3906,7 +3906,7 @@
     // Mach-O linker evidently handles this automatically
 #else /* defined(BUILD_OS_DARWIN) */
     // Add a reference to the PLT under -fPIC compilation.
-    if ( (Gen_PIC_Shared || Gen_PIC_Call_Shared) &&  
+    if ( Gen_PIC_Shared &&  
 	 !TN_is_label( OP_opnd(op,opnd) ) &&
          TOP_is_jump(topcode) &&
          opnd == OP_find_opnd_use(op,OU_target) ) {
Index: osprey/be/cg/x8664/exp_loadstore.cxx
===================================================================
--- osprey/be/cg/x8664/exp_loadstore.cxx	(revision 3546)
+++ osprey/be/cg/x8664/exp_loadstore.cxx	(working copy)
@@ -1176,8 +1176,8 @@
       else if( Is_Target_64bit() ){
         FmtAssert(!ST_is_thread_local(base_sym),
                   ("Exp_Ldst: thread-local storage should not be handled here"));
-	if (Gen_PIC_Shared || Gen_PIC_Call_Shared) {
-	  if ( ST_is_preemptible(base_sym) ) {
+	if (Gen_PIC_Shared) {
+	  if ( !ST_is_export_local(base_sym) ) {
 	    TN *tmp = base_ofst == 0 ? tn : Build_TN_Like(tn);
 	    Build_OP( TOP_ld64, tmp, Rip_TN(), 
 		      Gen_Symbol_TN( base_sym, 0, TN_RELOC_X8664_GOTPCREL ),
@@ -1225,8 +1225,7 @@
 	  ErrMsg(EC_Misc_User_Abort,
 	    ("Detected 64-bit address offset under -m32.  Try -m64 -mcmodel=medium."));
 
-	if( (Gen_PIC_Shared || Gen_PIC_Call_Shared) && 
-	    (!ST_is_export_local (base_sym) ||
+	if( Gen_PIC_Shared && (!ST_is_export_local (base_sym) ||
 	                       // function, even if export_local?
 	                       ST_class(base_sym) == CLASS_FUNC ||
 	                       // section?
@@ -1338,11 +1337,10 @@
 	}
       }
 
-      if( (Gen_PIC_Shared || Gen_PIC_Call_Shared) && 
-	  (!ST_is_export_local (base_sym) ||
-	                      // section?
-	                      (ST_class(base_sym) == CLASS_BLOCK &&
-	                       STB_section(base_sym) /* bug 10097 */)) ){
+      if( Gen_PIC_Shared && (!ST_is_export_local (base_sym) ||
+                              // section?
+                             (ST_class(base_sym) == CLASS_BLOCK &&
+                              STB_section(base_sym) /* bug 10097 */)) ){
 
 	if( Is_Target_64bit() ){
 	  TN *new_base = Build_TN_Of_Mtype(Pointer_Mtype);
Index: osprey/be/cg/whirl2ops.cxx
===================================================================
--- osprey/be/cg/whirl2ops.cxx	(revision 3546)
+++ osprey/be/cg/whirl2ops.cxx	(working copy)
@@ -1678,7 +1678,7 @@
 
 #ifdef TARG_X8664
   if( Is_Target_32bit() &&
-      (Gen_PIC_Shared || Gen_PIC_Call_Shared)    &&
+      Gen_PIC_Shared    &&
       call_st != NULL   &&
       !ST_is_export_local(call_st) ){
     PU_References_GOT = TRUE;
@@ -7784,7 +7784,7 @@
 
 #ifdef TARG_X8664
   if( Is_Target_32bit() &&
-      (Gen_PIC_Shared || Gen_PIC_Call_Shared)   &&
+      Gen_PIC_Shared    &&
       call_st != NULL   &&
       !ST_is_export_local(call_st) ){
     PU_References_GOT = TRUE;
Index: osprey/common/com/config.cxx
===================================================================
--- osprey/common/com/config.cxx	(revision 3546)
+++ osprey/common/com/config.cxx	(working copy)
@@ -1453,8 +1453,15 @@
 
   if ( Use_Large_GOT )	Guaranteed_Small_GOT = FALSE;
 
-  /* if we get both TENV:CPIC and TENV:PIC, use only TENV:CPIC */
-  if (Gen_PIC_Call_Shared && Gen_PIC_Shared) Gen_PIC_Shared = FALSE;
+  /* If we get both TENV:CPIC and TENV:PIC, use only TENV:PIC.
+   *
+   * To fix bug 721, "use only TENV:CPIC" is changed to "use only TENV:PIC".
+   * While PIC, represented by Gen_PIC_Shared, is for 'shared objects', 
+   * CPIC, represented by Gen_PIC_Call_Shared, is for 'dynamic executables'
+   * that call functions in shared objects. Since CPIC should be the default,
+   * Gen_PIC_Call_Shared is not very useful.
+   */
+  if (Gen_PIC_Call_Shared && Gen_PIC_Shared) Gen_PIC_Call_Shared = FALSE;
 
   /* Select optimization options: */
 
Index: osprey/common/com/x8664/config_targ.cxx
===================================================================
--- osprey/common/com/x8664/config_targ.cxx	(revision 3546)
+++ osprey/common/com/x8664/config_targ.cxx	(working copy)
@@ -818,9 +818,9 @@
   if ( DEBUG_Trap_Uv )
     FP_Exception_Enable_Min |= FPX_V;
 
-// TMP: ignore cpic until we figure out what to do with it
-//   if (Gen_PIC_Call_Shared)
-// 	Gen_PIC_Call_Shared = FALSE;
+  // TMP: ignore cpic until we figure out what to do with it
+  if (Gen_PIC_Call_Shared)
+    Gen_PIC_Call_Shared = FALSE;
 
   return;
 }
