Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2005

Tip: Looking for answers? Try searching our database.

Bug report: static string in dllimport-ed class causes internal co

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
reom - 26 Sep 2005 11:09 GMT
[ Microsoft Visual C++ .NET   69586-335-0000007-18332 ]

Hi,

I'm not sure this is the right place to report bugs in MS Visual C++ .NET
2003. I posted the same message on MSDN forums
(http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=95745).

In any case, the code below causes the following error:

main.cpp(22): fatal error C1001: INTERNAL COMPILER ERROR  (compiler file
'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symtab.c', line 4533)

My code:

// Bug report: static string variable in dllimport-ed class causes
// internal compiler error in p2symtab, line 4553

#include <iostream>
#include <string>

using namespace std;

class __declspec(dllimport) input_port {

public:
int foo() {
 static string str = "ABCD" ;
 return 2;
}
};

int main()
{
cout << __FILE__ << endl;

string r ("ABCD");
return 0;
}

The two strings (str in foo, and 'r' in main) need to be the same for the
bug to occur.
David Lowndes - 26 Sep 2005 17:00 GMT
>I'm not sure this is the right place to report bugs in MS Visual C++ .NET
>2003. I posted the same message on MSDN forums
[quoted text clipped - 4 lines]
>main.cpp(22): fatal error C1001: INTERNAL COMPILER ERROR  (compiler file
>'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symtab.c', line 4533)

FWIW, your example compiles cleanly with the VS2005 beta. I could
reproduce the problem with VS2003.

Dave
Signature

MVP VC++ FAQ: http://www.mvps.org/vcfaq


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.