diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 7022e596479233d04164d409b2123c144abb92ba..d76e1e9057b09ecf6ae2429686a156c436b0541e 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -506,9 +506,8 @@ pprInstr (COMMENT _) = empty -- nuke 'em pprInstr (COMMENT s) = ptext (sLit "# ") <> ftext s -} -pprInstr (LOCATION file line col name) - = ptext (sLit "\t.loc ") <> ppr file <+> ppr line <+> ppr col <> - ptext (sLit " /* ") <> text name <> ptext (sLit " */") +pprInstr (LOCATION file line col _name) + = ptext (sLit "\t.loc ") <> ppr file <+> ppr line <+> ppr col pprInstr (DELTA d) = pprInstr (COMMENT (mkFastString ("\tdelta = " ++ show d))) diff --git a/testsuite/tests/codeGen/should_compile/T10667.hs b/testsuite/tests/codeGen/should_compile/T10667.hs new file mode 100644 index 0000000000000000000000000000000000000000..665c764099a79f9b3517b02a35d9d5b397205157 --- /dev/null +++ b/testsuite/tests/codeGen/should_compile/T10667.hs @@ -0,0 +1,6 @@ +module A where + +-- when used with '-g' debug generation option +-- '*/*' leaked into a /* comment */ and broke +-- GNU as. +x */* y = 42 diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T index c78f9ac21a3344e4ab57a249c07d4ffae26fe1d6..ca71576e18570a4681c4a037ada47d69a998a7fa 100644 --- a/testsuite/tests/codeGen/should_compile/all.T +++ b/testsuite/tests/codeGen/should_compile/all.T @@ -31,3 +31,4 @@ test('debug', extra_clean(['debug.cmm']), ['$MAKE -s --no-print-directory debug']) test('T9964', normal, compile, ['-O']) test('T10518', [cmm_src], compile, ['']) +test('T10667', normal, compile, ['-g'])