7544 – ICE(interpret.c) Catching an exception with a null catch block

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7544 - ICE(interpret.c) Catching an exception with a null catch block
Summary: ICE(interpret.c) Catching an exception with a null catch block
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: yebblies
URL:
Keywords: CTFE, ice, pull
Depends on:
Blocks:
Reported: 2012年02月19日 04:10 UTC by yebblies
Modified: 2015年06月09日 05:11 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description yebblies 2012年02月19日 04:10:41 UTC
This only happens when the catch block is null - when the body statement is dropped by semantic. There are probably other ways to get this.
int test7544()
{
 try { throw new Exception(""); }
 catch (Exception e) static assert(1);
 return 1;
}
static assert(test7544());
Comment 1 yebblies 2012年02月19日 04:20:32 UTC
https://github.com/D-Programming-Language/dmd/pull/737 
Comment 2 github-bugzilla 2012年02月19日 13:11:57 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/4a36b2d3c15c83b47d39173ac150d1fad500273c
Merge pull request #737 from yebblies/issue7544
Issue 7544 - ICE(interpret.c) Catching an exception with a null catch block
Comment 3 github-bugzilla 2012年02月19日 13:24:47 UTC
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/bdde56fbd14989d099ebeeeb0b5a2ad1377e3979
fix Issue 7544 - ICE(interpret.c) Catching an exception with a null catch block


AltStyle によって変換されたページ (->オリジナル) /