aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-01-14 10:38:00 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-01-14 10:38:00 +0000
commit2b5e01fa094cd18e43391719ba373605cb664158 (patch)
tree70ba7ea0f6d4311fc3762600e9bbe2da4245ede2 /gcc/d/dmd
parent9c5f89006fa4b64c77997f660554a12315f4ac1d (diff)
downloadgcc-2b5e01fa094cd18e43391719ba373605cb664158.zip
gcc-2b5e01fa094cd18e43391719ba373605cb664158.tar.gz
gcc-2b5e01fa094cd18e43391719ba373605cb664158.tar.bz2
[D] Merge upstream dmd cd2034cd7
One fix in the asm statement parser to stop parsing if the end of the statement has been reached, and moves all inline asm tests to gdc.dg. These being adjusted where necessary to test the GCC style instead. gcc/testsuite/ChangeLog: 2019-01-14 Iain Buclaw <ibuclaw@gdcproject.org> * gdc.dg/asm1.d: New test. * gdc.dg/asm2.d: New test. * gdc.dg/asm3.d: New test. * gdc.dg/asm4.d: New test. * lib/gdc.exp (gdc_init): Set gcc_error_prefix and gcc_warning_prefix. From-SVN: r267913
Diffstat (limited to 'gcc/d/dmd')
-rw-r--r--gcc/d/dmd/MERGE2
-rw-r--r--gcc/d/dmd/iasmgcc.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index feb6592..a3b2db7 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-6d5b853d30908638d49210ebe600917296b8ab9b
+cd2034cd7b157dd8f3e94c684061bb1aa630b2b6
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/gcc/d/dmd/iasmgcc.c b/gcc/d/dmd/iasmgcc.c
index 3c0494d..cecbdef 100644
--- a/gcc/d/dmd/iasmgcc.c
+++ b/gcc/d/dmd/iasmgcc.c
@@ -224,7 +224,7 @@ Lerror:
static GccAsmStatement *parseGccAsm(Parser *p, GccAsmStatement *s)
{
s->insn = p->parseExpression();
- if (p->token.value == TOKsemicolon)
+ if (p->token.value == TOKsemicolon || p->token.value == TOKeof)
goto Ldone;
// No semicolon followed after instruction template, treat as extended asm.
@@ -254,7 +254,7 @@ static GccAsmStatement *parseGccAsm(Parser *p, GccAsmStatement *s)
assert(0);
}
- if (p->token.value == TOKsemicolon)
+ if (p->token.value == TOKsemicolon || p->token.value == TOKeof)
goto Ldone;
}
Ldone:
@@ -288,6 +288,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
*ptoklist = NULL;
}
p.token = *toklist;
+ p.scanloc = s->loc;
// Parse the gcc asm statement.
s = parseGccAsm(&p, s);