This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/626: Array in thrown exception object causes g++ to fail



>Number:         626
>Category:       c++
>Synopsis:       Array in thrown exception object causes g++ to fail
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 09 17:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     rgillen@webmd.net
>Release:        unknown-1.0
>Organization:
>Environment:
Linux 2.2.16-9mdksmp #1 SMP Thu Jun 22 16:15:32 PDT 2000 i686 unknown
gcc 2.95.3 19991030
>Description:
g++ fails with the following output:

  $ g++ -v --save-temps errbld.cpp

  Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs
  gcc version 2.95.3 19991030 (prerelease)
   /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ errbld.cpp errbld.ii
  GNU CPP version 2.95.3 19991030 (prerelease) (i386 Linux/ELF)
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/../../../../include/g++-3
   /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/../../../../i586-mandrake-linux/include
   /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/include
   /usr/include
  End of search list.
  The following default directories have been omitted from the search path:
   /usr/local/include
  End of omitted list.
   /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/cc1plus errbld.ii -quiet -dumpbase errbld.cc -version -o errbld.s
  GNU C++ version 2.95.3 19991030 (prerelease) (i586-mandrake-linux) compiled by GNU C version 2.95.3 19991030 (prerelease).
  errbld.cpp: In method `a::a()':
  errbld.cpp:25: Internal compiler error in `find_function_data', at function.c:542
  Please submit a full bug report.

It appears that trying to throw an object whose constructor
contains an array to be allocated is creating some problems
for gcc.

Other fail messages can be coaxed by altering the source 
slightly.  Another error that I got was 

  Internal compiler error in `find_function_data', at function.c:542

if you take away the inline definition for the constructor 
in class b.

I don't have a copy of the standard, so I can't say whether
the code is 100% legal, but the compiler should spit out
legitimate parsing errors if it encounters any non-kosher
code.
>How-To-Repeat:
use the following command line to compile the source:

  g++ -v --save-temps errbld.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="errbld.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="errbld.ii"

IyAxICJlcnJibGQuY3BwIgpjbGFzcyBhCnsKICBwdWJsaWM6CiAgICBhOjphKCk7CiAgcHJpdmF0
ZToKICAgIGxvbmcgbV9mb287Cn07CgoKY2xhc3MgYgp7CiAgcHVibGljOgogICAgYiggKXt9Owog
IHByaXZhdGU6CiAgICBzdGF0aWMgY29uc3QgaW50IE1BWDsKICAgIGNoYXIgbV9zdHJbTUFYXTsK
fTsKCmNvbnN0IGludCBiOjpNQVggPSA1OwoKYTo6YSgpCnsKICBpZiAoIG1fZm9vICkKICB7CiAg
ICB0aHJvdyBiKCApOwogIH0KfQoK

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]