summaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-14 22:13:26 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-14 22:13:26 +0000
commitdb24420fa8d8b55c59886b0df97cf0a9498d83d3 (patch)
treeb7448e76189c5ab9dda84e7e0e477eace20755e4 /gcc/fortran/options.c
parent6975c72416c3094c70f84b4083fde122e8c3f4eb (diff)
2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56224 * gfortran.h (gfc_add_include_path): Add boolean argument for warn. * scanner.c (gfc_add_include_path): Pass along warn argument to add_path_to_list. * options.c (gfc_post_options): Add true warn argument to gfc_add_include_path. (gfc_handle_module_path_options): Likewise. (gfc_handle_option): Also gfc_add_include_path for intrinsic modules, without warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196058 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index a01463465549..fba1a3f3a88b 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -337,10 +337,10 @@ gfc_post_options (const char **pfilename)
source_path = (char *) alloca (i + 1);
memcpy (source_path, canon_source_file, i);
source_path[i] = 0;
- gfc_add_include_path (source_path, true, true);
+ gfc_add_include_path (source_path, true, true, true);
}
else
- gfc_add_include_path (".", true, true);
+ gfc_add_include_path (".", true, true, true);
if (canon_source_file != gfc_source_file)
free (CONST_CAST (char *, canon_source_file));
@@ -498,7 +498,7 @@ gfc_handle_module_path_options (const char *arg)
gfc_option.module_dir = XCNEWVEC (char, strlen (arg) + 2);
strcpy (gfc_option.module_dir, arg);
- gfc_add_include_path (gfc_option.module_dir, true, false);
+ gfc_add_include_path (gfc_option.module_dir, true, false, true);
strcat (gfc_option.module_dir, "/");
}
@@ -844,6 +844,13 @@ gfc_handle_option (size_t scode, const char *arg, int value,
case OPT_fintrinsic_modules_path:
case OPT_fintrinsic_modules_path_:
+
+ /* This is needed because omp_lib.h is in a directory together
+ with intrinsic modules. Do no warn because during testing
+ without an installed compiler, we would get lots of bogus
+ warnings for a missing include directory. */
+ gfc_add_include_path (arg, false, false, false);
+
gfc_add_intrinsic_modules_path (arg);
break;
@@ -978,7 +985,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_I:
- gfc_add_include_path (arg, true, false);
+ gfc_add_include_path (arg, true, false, true);
break;
case OPT_J: