Bug 24906 - ICE When using -fmudflap on a simple C++ source file
Summary: ICE When using -fmudflap on a simple C++ source file
Status: RESOLVED DUPLICATE of bug 19266
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-16 21:17 UTC by Martin Audet
Modified: 2005-11-16 21:20 UTC (History)
7 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Audet 2005-11-16 21:17:10 UTC
Hi,

I get the following message when I try to compile a simple C++ source file using strings:

strbug.cpp: In member function 'void AClass::meth(AClass::AnInterface&)':
strbug.cpp:17: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccvs6PL2.out file, please attach this to your bugreport.

This happens when I compile as follow:

g++ -Wall -fmudflap -c strbug.cpp

Without the -fmudflap flag, there is no ICE.

The corresponding source file is:

#include <string>

class AClass {
private:
   std::string name;

public:
   class AnInterface {
   public:
      virtual bool intf_meth(AClass &p_aclass) = 0;
      virtual ~AnInterface(void) { }
   };

   void meth(AnInterface &p_interf);
};

void AClass::meth(AnInterface &p_interf)
{
   name = std::string();

   p_interf.intf_meth(*this);
}

I did not included the preprocessed source file since it is more than 19k lines long.

Note also that I'm using Fedora Core 4 Linux with the gcc update installed (this is why it is version 4.0.1).

Regards,

Martin
Comment 1 Andrew Pinski 2005-11-16 21:20:50 UTC
This is a dup of bug 19266 which is fixed for 4.1.0.

*** This bug has been marked as a duplicate of 19266 ***