Commit 359973a7 authored by Matthias Klose's avatar Matthias Klose

* Update to SVN 20190321 (r269833) from the gcc-7-branch.

parent 21610a48
gcc-7 (7.4.0-8) UNRELEASED; urgency=medium
* Update to SVN 20190321 (r269833) from the gcc-7-branch.
- Fix PR target/89523 (x86), PR lto/87525, PR target/84272 (AArch64),
PR lto/88147, PR c++/89585, PR fortran/84394, PR fortran/66089,
PR fortran/66695, PR fortran/77746, PR fortran/79485, PR fortran/87673,
PR fortran/71544, PR fortran/87734, PR c++/89383.
* Fix PR tree-optimization/89505, taken from the gcc-8 branch.
* Fix package descriptions for cross packages.
* Fix cross building gdc (Helmut Grohne). Addresses: #925040.
......@@ -7,7 +12,7 @@ gcc-7 (7.4.0-8) UNRELEASED; urgency=medium
depend on binutils and libgcc-dev. Addresses: #911668.
* Fix stripping the gcc-hppa64 package.
-- Matthias Klose <doko@debian.org> Wed, 13 Mar 2019 21:38:19 +0100
-- Matthias Klose <doko@debian.org> Thu, 21 Mar 2019 13:33:57 +0100
gcc-7 (7.4.0-7) unstable; urgency=medium
......
# DP: Fix PR c++/89585, taken from the gcc-8 branch.
gcc/cp/
2019-03-07 Jakub Jelinek <jakub@redhat.com>
PR c++/89585
* parser.c (cp_parser_asm_definition): Parse asm qualifiers even
at toplevel, but diagnose them.
gcc/testsuite/
2019-03-07 Jakub Jelinek <jakub@redhat.com>
PR c++/89585
* g++.dg/asm-qual-3.C: Adjust expected diagnostics.
--- a/src/gcc/cp/parser.c (revision 269451)
+++ b/src/gcc/cp/parser.c (revision 269452)
@@ -19125,8 +19125,9 @@
location_t volatile_loc = UNKNOWN_LOCATION;
location_t inline_loc = UNKNOWN_LOCATION;
location_t goto_loc = UNKNOWN_LOCATION;
+ location_t first_loc = UNKNOWN_LOCATION;
- if (cp_parser_allow_gnu_extensions_p (parser) && parser->in_function_body)
+ if (cp_parser_allow_gnu_extensions_p (parser))
for (;;)
{
cp_token *token = cp_lexer_peek_token (parser->lexer);
@@ -19152,6 +19153,8 @@
}
else
inline_loc = loc;
+ if (!first_loc)
+ first_loc = loc;
cp_lexer_consume_token (parser->lexer);
continue;
@@ -19163,6 +19166,8 @@
}
else
goto_loc = loc;
+ if (!first_loc)
+ first_loc = loc;
cp_lexer_consume_token (parser->lexer);
continue;
@@ -19182,6 +19187,12 @@
bool inline_p = (inline_loc != UNKNOWN_LOCATION);
bool goto_p = (goto_loc != UNKNOWN_LOCATION);
+ if (!parser->in_function_body && (inline_p || goto_p))
+ {
+ error_at (first_loc, "asm qualifier outside of function body");
+ inline_p = goto_p = false;
+ }
+
/* Look for the opening `('. */
if (!cp_parser_require (parser, CPP_OPEN_PAREN, RT_OPEN_PAREN))
return;
--- a/src/gcc/testsuite/g++.dg/asm-qual-3.C (revision 269451)
+++ b/src/gcc/testsuite/g++.dg/asm-qual-3.C (revision 269452)
@@ -2,11 +2,11 @@
// { dg-do compile }
// { dg-options "-std=gnu++98" }
-asm const (""); // { dg-error {expected '\(' before 'const'} }
-asm volatile (""); // { dg-error {expected '\(' before 'volatile'} }
+asm const (""); // { dg-error {'const' is not an asm qualifier} }
+asm volatile ("");
asm restrict (""); // { dg-error {expected '\(' before 'restrict'} }
-asm inline (""); // { dg-error {expected '\(' before 'inline'} }
-asm goto (""); // { dg-error {expected '\(' before 'goto'} }
+asm inline (""); // { dg-error {asm qualifier outside of function body} }
+asm goto (""); // { dg-error {asm qualifier outside of function body} }
// There are many other things wrong with this code, so:
// { dg-excess-errors "" }
This diff is collapsed.
......@@ -92,7 +92,6 @@ debian_patches += \
libffi-riscv \
gcc-force-cross-layout \
kfreebsd-decimal-float \
pr89585 \
pr89505 \
pr87808 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment