re PR driver/69805 (ICE in greater_than_spec_func, at gcc.c:9722)
PR driver/69805 * gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): Use :%* in %:gt() argument. (greater_than_spec_func): Adjust for expecting only numbers, if there are more than two numbers, compare the last two. * testsuite/libgomp.c/pr69805.c: New test. From-SVN: r233573
This commit is contained in:
parent
3a27b4db56
commit
f3609a89f4
4 changed files with 30 additions and 24 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR driver/69805
|
||||||
|
* gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): Use
|
||||||
|
:%* in %:gt() argument.
|
||||||
|
(greater_than_spec_func): Adjust for expecting only numbers,
|
||||||
|
if there are more than two numbers, compare the last two.
|
||||||
|
|
||||||
2016-02-19 Jonathan Wakely <jwakely@redhat.com>
|
2016-02-19 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
* doc/invoke.texi (C++ Dialect Options): Clarify interaction of
|
* doc/invoke.texi (C++ Dialect Options): Clarify interaction of
|
||||||
|
|
32
gcc/gcc.c
32
gcc/gcc.c
|
@ -1019,7 +1019,7 @@ proper position among the other output files. */
|
||||||
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
|
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
|
||||||
%{static:} %{L*} %(mfwrap) %(link_libgcc) " \
|
%{static:} %{L*} %(mfwrap) %(link_libgcc) " \
|
||||||
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
|
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
|
||||||
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*} 1):\
|
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
|
||||||
%:include(libgomp.spec)%(link_gomp)}\
|
%:include(libgomp.spec)%(link_gomp)}\
|
||||||
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
|
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
|
||||||
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
|
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
|
||||||
|
@ -1183,7 +1183,7 @@ static const char *const multilib_defaults_raw[] = MULTILIB_DEFAULTS;
|
||||||
for targets that use different start files and suchlike. */
|
for targets that use different start files and suchlike. */
|
||||||
#ifndef GOMP_SELF_SPECS
|
#ifndef GOMP_SELF_SPECS
|
||||||
#define GOMP_SELF_SPECS \
|
#define GOMP_SELF_SPECS \
|
||||||
"%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*} 1): " \
|
"%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1): " \
|
||||||
"-pthread}"
|
"-pthread}"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -9764,7 +9764,7 @@ replace_extension_spec_func (int argc, const char **argv)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns "" if the n in ARGV[1] == -opt=<n> is greater than ARGV[2].
|
/* Returns "" if ARGV[ARGC - 2] is greater than ARGV[ARGC-1].
|
||||||
Otherwise, return NULL. */
|
Otherwise, return NULL. */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -9775,29 +9775,13 @@ greater_than_spec_func (int argc, const char **argv)
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
gcc_assert (argc == 3);
|
gcc_assert (argc >= 2);
|
||||||
gcc_assert (argv[0][0] == '-');
|
|
||||||
gcc_assert (argv[0][1] == '\0');
|
|
||||||
|
|
||||||
/* Point p to <n> in in -opt=<n>. */
|
long arg = strtol (argv[argc - 2], &converted, 10);
|
||||||
const char *p = argv[1];
|
gcc_assert (converted != argv[argc - 2]);
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
char c = *p;
|
|
||||||
if (c == '\0')
|
|
||||||
gcc_unreachable ();
|
|
||||||
|
|
||||||
++p;
|
long lim = strtol (argv[argc - 1], &converted, 10);
|
||||||
|
gcc_assert (converted != argv[argc - 1]);
|
||||||
if (c == '=')
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
long arg = strtol (p, &converted, 10);
|
|
||||||
gcc_assert (converted != p);
|
|
||||||
|
|
||||||
long lim = strtol (argv[2], &converted, 10);
|
|
||||||
gcc_assert (converted != argv[2]);
|
|
||||||
|
|
||||||
if (arg > lim)
|
if (arg > lim)
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR driver/69805
|
||||||
|
* testsuite/libgomp.c/pr69805.c: New test.
|
||||||
|
|
||||||
2016-02-16 Tom de Vries <tom@codesourcery.com>
|
2016-02-16 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
PR lto/67709
|
PR lto/67709
|
||||||
|
|
9
libgomp/testsuite/libgomp.c/pr69805.c
Normal file
9
libgomp/testsuite/libgomp.c/pr69805.c
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/* PR driver/69805 */
|
||||||
|
/* { dg-do link } */
|
||||||
|
/* { dg-options "-ftree-parallelize-loops=1 -O2 -ftree-parallelize-loops=2" } */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue