public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30293]  New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
@ 2006-12-26 11:06 reichelt at gcc dot gnu dot org
  2006-12-26 11:07 ` [Bug c++/30293] " reichelt at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-12-26 11:06 UTC (permalink / raw)
  To: gcc-bugs

The following code snippet triggers an ICE since GCC 4.0.0:

==================================
extern "Java" struct A {};

A a = A();
==================================

bug.cc:3: internal compiler error: in store_init_value, at cp/typeck2.c:598
Please submit a full bug report, [etc.]

With GCC 3.4.x we got the message:

bug.cc:3: error: no matching function for call to `A::A(A)'


-- 
           Summary: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in
                    store_init_value
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
@ 2006-12-26 11:07 ` reichelt at gcc dot gnu dot org
  2006-12-26 22:19 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-12-26 11:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
  2006-12-26 11:07 ` [Bug c++/30293] " reichelt at gcc dot gnu dot org
@ 2006-12-26 22:19 ` pinskia at gcc dot gnu dot org
  2007-01-09  2:47 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-26 22:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-12-26 22:19 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-26 22:19:41
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
  2006-12-26 11:07 ` [Bug c++/30293] " reichelt at gcc dot gnu dot org
  2006-12-26 22:19 ` pinskia at gcc dot gnu dot org
@ 2007-01-09  2:47 ` mmitchel at gcc dot gnu dot org
  2007-01-09 18:46 ` tromey at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-01-09  2:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mmitchel at gcc dot gnu dot org  2007-01-09 02:47 -------
Of course, in C++, A would have a default constructor, since no constructor was
explicitly declared.  But, is a Java type not supposed to have a constructor in
this case?  If not, why not?  That seems fundamentally at odds with C++; it
would be more C++-ful, if we want to prevent construction, to have a declared
constructor -- but make it both undefined and private?


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-01-09  2:47 ` mmitchel at gcc dot gnu dot org
@ 2007-01-09 18:46 ` tromey at gcc dot gnu dot org
  2007-02-03 21:21 ` gdr at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 18:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tromey at gcc dot gnu dot org  2007-01-09 18:46 -------
We already only support 'extern "Java"' classes where the body of the
class is written in Java and compiled with gcj.  The reason for this is
that a Java class has a lot of required metadata which g++ does not know
how to generate.

So, I think the only truly supported way to make an extern "Java" class is
via gcjh.  (Well, plus a couple of special cases in libjava.)

Given this, I think it would be fine to just have a constructor-less 
extern "Java" class be a fatal error.  The Java compiler will always emit
a default constructor, and hence gcjh-generated headers will always be
correct.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-01-09 18:46 ` tromey at gcc dot gnu dot org
@ 2007-02-03 21:21 ` gdr at gcc dot gnu dot org
  2007-02-03 21:23 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 21:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from gdr at gcc dot gnu dot org  2007-02-03 21:21 -------
won't fix in GCC-4.0.x.  Adjusting milestone.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.4                       |4.1.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-02-03 21:21 ` gdr at gcc dot gnu dot org
@ 2007-02-03 21:23 ` pinskia at gcc dot gnu dot org
  2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 21:23 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.3                       |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-02-03 21:23 ` pinskia at gcc dot gnu dot org
@ 2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
  2007-11-12  0:52 ` pcarlini at suse dot de
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
@ 2007-11-12  0:52 ` pcarlini at suse dot de
  2007-11-12 18:07 ` tromey at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pcarlini at suse dot de @ 2007-11-12  0:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pcarlini at suse dot de  2007-11-12 00:52 -------
Hi Tom, we still have this rather old P2 (ans also 30294), was wondering
whether you would be interested...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-11-12  0:52 ` pcarlini at suse dot de
@ 2007-11-12 18:07 ` tromey at gcc dot gnu dot org
  2007-11-22 10:11 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-11-12 18:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tromey at gcc dot gnu dot org  2007-11-12 18:07 -------
Yeah, for both this and for PR 30294, I think we can just reject some
constructs very early.  I don't think it makes sense to declare variables,
fields, or functions with "java" types that are not pointers.
The only question here, I think, is whether libgcj uses this construct.

Maybe there could still be a bug for 30293 though.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-11-12 18:07 ` tromey at gcc dot gnu dot org
@ 2007-11-22 10:11 ` jakub at gcc dot gnu dot org
  2007-11-23 20:49 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-22 10:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2007-11-22 10:11 -------
Testing a patch which does that.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-08-06 14:52:47         |2007-11-22 10:11:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-11-22 10:11 ` jakub at gcc dot gnu dot org
@ 2007-11-23 20:49 ` jakub at gcc dot gnu dot org
  2007-11-23 20:50 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-23 20:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2007-11-23 20:49 -------
Subject: Bug 30293

Author: jakub
Date: Fri Nov 23 20:49:02 2007
New Revision: 130382

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130382
Log:
        PR c++/30293
        PR c++/30294
        * decl.c (cp_finish_decl): Disallow variable or field
        definitions if extern "Java" aggregates.
        (grokparms): Disallow parameters with extern "Java"
        aggregates.
        (check_function_type): Disallow function return values
        with extern "Java" aggregates.
        * init.c (build_new_1): Disallow placement new with
        extern "Java" aggregates.

        * g++.dg/ext/java-2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/ext/java-2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2007-11-23 20:49 ` jakub at gcc dot gnu dot org
@ 2007-11-23 20:50 ` jakub at gcc dot gnu dot org
  2007-11-23 20:51 ` [Bug c++/30293] [4.0/4.1/4.2 " jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-23 20:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2007-11-23 20:49 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.0/4.1/4.2 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2007-11-23 20:50 ` jakub at gcc dot gnu dot org
@ 2007-11-23 20:51 ` jakub at gcc dot gnu dot org
  2008-07-04 21:47 ` [Bug c++/30293] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-30 20:17 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-11-23 20:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jakub at gcc dot gnu dot org  2007-11-23 20:51 -------
Fixed just on the trunk.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|[4.0/4.1/4.2/4.3 regression]|[4.0/4.1/4.2 regression] ICE
                   |ICE with extern "Java" in   |with extern "Java" in
                   |store_init_value            |store_init_value


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.2 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2007-11-23 20:51 ` [Bug c++/30293] [4.0/4.1/4.2 " jakub at gcc dot gnu dot org
@ 2008-07-04 21:47 ` jsm28 at gcc dot gnu dot org
  2009-03-30 20:17 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jsm28 at gcc dot gnu dot org  2008-07-04 21:46 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 regression] ICE    |[4.2 regression] ICE with
                   |with extern "Java" in       |extern "Java" in
                   |store_init_value            |store_init_value
   Target Milestone|4.1.3                       |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/30293] [4.2 regression] ICE with extern "Java" in store_init_value
  2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2008-07-04 21:47 ` [Bug c++/30293] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-30 20:17 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-30 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jsm28 at gcc dot gnu dot org  2009-03-30 20:17 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
      Known to fail|4.0.4                       |4.0.4 4.2.5
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30293


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-03-30 20:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-26 11:06 [Bug c++/30293] New: [4.0/4.1/4.2/4.3 regression] ICE with extern "Java" in store_init_value reichelt at gcc dot gnu dot org
2006-12-26 11:07 ` [Bug c++/30293] " reichelt at gcc dot gnu dot org
2006-12-26 22:19 ` pinskia at gcc dot gnu dot org
2007-01-09  2:47 ` mmitchel at gcc dot gnu dot org
2007-01-09 18:46 ` tromey at gcc dot gnu dot org
2007-02-03 21:21 ` gdr at gcc dot gnu dot org
2007-02-03 21:23 ` pinskia at gcc dot gnu dot org
2007-02-14  9:19 ` mmitchel at gcc dot gnu dot org
2007-11-12  0:52 ` pcarlini at suse dot de
2007-11-12 18:07 ` tromey at gcc dot gnu dot org
2007-11-22 10:11 ` jakub at gcc dot gnu dot org
2007-11-23 20:49 ` jakub at gcc dot gnu dot org
2007-11-23 20:50 ` jakub at gcc dot gnu dot org
2007-11-23 20:51 ` [Bug c++/30293] [4.0/4.1/4.2 " jakub at gcc dot gnu dot org
2008-07-04 21:47 ` [Bug c++/30293] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-30 20:17 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).