mirror of git://gcc.gnu.org/git/gcc.git
re PR other/88007 (ICE in gt_ggc_m_S, at ggc-page.c:1474)
PR other/88007 * c-common.c (parse_optimize_options): Allocate option string from opts_obstack rather than as GC memory. Move the allocation after warning for invalid option. * gcc.dg/pr88007.c: New test. From-SVN: r266141
This commit is contained in:
parent
5bfba2b58d
commit
8cca0163fb
|
|
@ -1,3 +1,10 @@
|
|||
2018-11-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR other/88007
|
||||
* c-common.c (parse_optimize_options): Allocate option string from
|
||||
opts_obstack rather than as GC memory. Move the allocation after
|
||||
warning for invalid option.
|
||||
|
||||
2018-11-13 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
* c-common.c (c_get_substring_location): Update for renaming of
|
||||
|
|
|
|||
|
|
@ -5523,8 +5523,6 @@ parse_optimize_options (tree args, bool attr_p)
|
|||
next_p = NULL;
|
||||
}
|
||||
|
||||
r = q = (char *) ggc_alloc_atomic (len2 + 3);
|
||||
|
||||
/* If the user supplied -Oxxx or -fxxx, only allow -Oxxx or -fxxx
|
||||
options. */
|
||||
if (*p == '-' && p[1] != 'O' && p[1] != 'f')
|
||||
|
|
@ -5539,6 +5537,9 @@ parse_optimize_options (tree args, bool attr_p)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Can't use GC memory here, see PR88007. */
|
||||
r = q = XOBNEWVEC (&opts_obstack, char, len2 + 3);
|
||||
|
||||
if (*p != '-')
|
||||
{
|
||||
*r++ = '-';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
2018-11-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR other/88007
|
||||
* gcc.dg/pr88007.c: New test.
|
||||
|
||||
PR rtl-optimization/87817
|
||||
* gcc.target/i386/bmi2-bzhi-3.c (main): Add a couple of new tests.
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
/* PR other/88007 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "--param ggc-min-expand=3 --param ggc-min-heapsize=1024" } */
|
||||
/* { dg-skip-if "no code alignment > 2" { "pdp11-*-*" } } */
|
||||
|
||||
void bar (void);
|
||||
|
||||
__attribute__((optimize ("align-loops=16", "align-jumps=16",
|
||||
"align-labels=16", "align-functions=16")))
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
for (int i = 0; i < 1024; ++i)
|
||||
bar ();
|
||||
}
|
||||
Loading…
Reference in New Issue