Bug 317928 (MONO74877) - mcs generates invalid IL in presence of unreachable code
Summary: mcs generates invalid IL in presence of unreachable code
Status: RESOLVED MOVED
Alias: MONO74877
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-09 05:55 UTC by Gonzalo Paniagua Javier
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
foo2.cs (2.93 KB, text/plain)
2005-05-09 05:55 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:16:18 UTC


---- Reported by gonzalo@ximian.com 2005-05-08 22:55:09 MST ----

Compile as mcs -r:System.Web.Services.dll foo2.cs
foo2.cs(11) warning CS0162: Unreachable code detected
foo2.cs(15) warning CS0162: Unreachable code detected
Compilation succeeded - 2 warning(s)

and run.

Actual results:
** ERROR **: Invalid IL code at IL0041 in X:Main (): IL_0041: nop

Additional information:
The culprit is the return at the beginning of Main.



---- Additional Comments From gonzalo@ximian.com 2005-05-08 22:55:40 MST ----

Created an attachment (id=167892)
foo2.cs




---- Additional Comments From gonzalo@ximian.com 2005-05-09 22:47:55 MST ----

Possible duplicate for https://bugzilla.novell.com/show_bug.cgi?id=MONO74873



---- Additional Comments From martin@ximian.com 2005-05-12 19:02:14 MST ----



*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO74873 ***

Imported an attachment (id=167892)

Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"