Skip to content
Snippets Groups Projects
Commit ca7510e4 authored by Malik Ammar Faisal's avatar Malik Ammar Faisal Committed by Marge Bot
Browse files

Fix float parsing in GHC Cmm Lexer

Add test case for bug #24224
parent fae472a9
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ $namechar = [$namebegin $digit]
@hexadecimal = $hexit+
@exponent = [eE] [\-\+]? @decimal
@floating_point = @decimal \. @decimal @exponent? | @decimal @exponent
@floating_point = [\-]? (@decimal \. @decimal @exponent? | @decimal @exponent)
@escape = \\ ([abfnrt\\\'\"\?] | x $hexit{1,2} | $octit{1,3})
@strchar = ($printable # [\"\\]) | @escape
......
main () {
float64 f1; f1 = (-1.0 :: float64);
}
==================== Output Cmm ====================
[main() { // []
{ info_tbls: []
stack_info: arg_space: 8
}
{offset
_lbl_:
__locVar_::F64 = -1.0 :: W64;
goto c2;
}
}]
......@@ -12,3 +12,4 @@ test('T16930', normal, makefile_test, ['T16930'])
test('T17442', normal, compile, [''])
test('T20725', normal, compile, ['-package ghc'])
test('T23610', normal, makefile_test, ['T23610'])
test('T24224', [cmm_src, grep_errmsg(r'(F64.*);', [1])], compile, ['-no-hs-main -ddump-cmm -dsuppress-all -dsuppress-uniques'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment