Author: dgilmore
Date: 2010-11-23 15:48:17 -0500 (Tue, 23 Nov 2010)
New Revision: 3407

Modified:
   trunk/osprey/driver/OPTIONS
   trunk/osprey/driver/phases.c
   trunk/osprey/driver/special_options.c
Log:
Fixed bug 685 -- Fortran compiler driver does not
properly handle -fopenmp option.

Reviewed and approved by Michael Lai.


Modified: trunk/osprey/driver/OPTIONS
===================================================================
--- trunk/osprey/driver/OPTIONS 2010-11-22 07:08:09 UTC (rev 3406)
+++ trunk/osprey/driver/OPTIONS 2010-11-23 20:48:17 UTC (rev 3407)
@@ -965,8 +965,8 @@
 -openmp                        ;               FTN,Cc  ffe     -mp
         "enable the multiprocessing directives (same as -mp)"
 #ifdef KEY
--fopenmp toggle(&mpkind,NORMAL_MP);    FTN,Cc  ffe,cfe self
-        "enable the multiprocessing directives"
+-fopenmp                       ;               FTN,Cc  ffe     -mp
+        "enable the multiprocessing directives (same as -mp)"
 #endif
 #ifndef KEY
 -dsm_clone             ;               ALL     ipl,be,d        self

Modified: trunk/osprey/driver/phases.c
===================================================================
--- trunk/osprey/driver/phases.c        2010-11-22 07:08:09 UTC (rev 3406)
+++ trunk/osprey/driver/phases.c        2010-11-23 20:48:17 UTC (rev 3407)
@@ -267,6 +267,10 @@
                                add_string(list, iname);
                        }
                }
+               else if (strcmp(iname, "-mp") == 0
+                        && (phase == P_spin_cc1 || phase == P_spin_cc1plus)) {
+                       add_string(list, "-fopenmp");
+               }
                else
                        add_string(list, iname);
        }

Modified: trunk/osprey/driver/special_options.c
===================================================================
--- trunk/osprey/driver/special_options.c       2010-11-22 07:08:09 UTC (rev 
3406)
+++ trunk/osprey/driver/special_options.c       2010-11-23 20:48:17 UTC (rev 
3407)
@@ -309,20 +309,6 @@
        prepend_option_seen (flag);
 #endif
 
-#ifdef KEY
-       // Pass -fopenmp instead of -mp to GNU 4.2 or later C/C++ front-end.
-       // Bug 12824.
-       if (mpkind == NORMAL_MP &&
-           gnu_major_version == 4 &&
-           gnu_minor_version >= 2 &&
-           (invoked_lang == L_cc ||
-            invoked_lang == L_CC)) {
-         set_option_unseen(O_mp);
-         set_option_unseen(O_openmp);
-         add_option_seen(O_fopenmp);
-       }
-#endif
-
 #ifndef KEY    // Bug 4406.
        if (mpkind == CRAY_MP) {
                Process_Cray_Mp();


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to