User account creation filtered due to spam.

Bug 13252 - gcj bug handling qualified "super"
Summary: gcj bug handling qualified "super"
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
Keywords: rejects-valid
Depends on: 28067
  Show dependency treegraph
Reported: 2003-12-01 02:27 UTC by Rutger Ovidius
Modified: 2007-01-09 20:45 UTC (History)
2 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2005-05-09 00:38:55


Note You need to log in before you can comment on or make changes to this bug.
Description Rutger Ovidius 2003-12-01 02:27:34 UTC
public class One {
   public Object A() {
      return new Object();
public class Two extends One {
     public void B () {
          Object obj = Two.super.A();
     public static void main(String[] args)

gcj -c *.java error: 'class' or 'this' expected.
                Object obj = Two.super.A ()

javac *.java works fine.

If I make "A" return void:

One: public A() {}
Two: public void B {} { Two.super.A(); }
I get:

gcj -c *.java error: '(' expected.
                Two.super.A ();

The original code I am trying to compile from .java is from jface

    protected Control createContents(final Composite parent) {
        final Control[] control = new Control[1];
        BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
            public void run() {
                control[0] = PreferenceDialog.super.createContents(parent);
                // Add the first page
        return control[0];

This returns a:
org\eclipse\jface\preference\ error: 'class' 
or 'this' expected.
                                control[0] = 

gcc version 3.4 20031123 (experimental)   (thisiscool win32 build)
Comment 1 Andrew Pinski 2003-12-01 03:14:27 UTC
Comment 2 Giovanni Bajo 2004-01-14 04:32:41 UTC
Is this a regression? I have java build online with mainline here.
Comment 3 Andrew Pinski 2004-01-14 04:40:03 UTC
I also confirmed it on 3.0.4, 3.2.3, and 3.3.1 with the same error message so this is not a 
Comment 4 Paul Brook 2004-01-20 15:45:14 UTC
*** Bug 12842 has been marked as a duplicate of this bug. ***
Comment 5 CVS Commits 2004-04-04 23:27:59 UTC
Subject: Bug 13252

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	2004-04-04 23:27:51

Modified files:
	gcc/fortran    : ChangeLog f95-lang.c gfortran.h trans-array.c 
	                 trans-common.c trans-const.c trans-const.h 
	                 trans-decl.c trans-expr.c trans-intrinsic.c 
	                 trans-io.c trans-stmt.c trans-types.c 
	                 trans-types.h trans.h 
	gcc/testsuite  : ChangeLog.tree-ssa 
Added files:
	gcc/testsuite/gfortran.fortran-torture/execute: strarray_1.f90 

Log message:
	PR 13252
	PR 14081
	* f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
	and stack_restore.
	* gfortran.h (struct gfc_charlen): Add backend_decl.
	* trans-array.c (gfc_trans_allocate_temp_array,
	gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
	(gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
	Remove old, broken string handling.
	(gfc_trans_auto_array_allocation, gfc_trans_g77_array,
	gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
	gfc_trans_deferred_array): Handle character arrays.
	* trans-const.c (gfc_conv_const_charlen): New function.
	* trans-const.h (gfc_conv_const_charlen): Add prototype.
	* trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
	as static.
	(gfc_build_dummy_array_decl): Handle arrays with unknown element size.
	(gfc_create_string_length): New function.
	(gfc_get_symbol_decl): Create lengths for character variables.
	(gfc_get_fake_result_decl): Ditto.
	(gfc_build_function_decl): Only set length for assumed length
	character arguments.
	(gfc_trans_dummy_character): New function.
	(gfc_trans_auto_character_variable): Rewrite.
	(gfc_trans_deferred_vars): Handle more types of character variable.
	(gfc_create_module_variable): String lengths have moved.
	(gfc_generate_function_code): Initialize deferred var chain earlier.
	* trans-expr.c (gfc_conv_init_string_length): Rename ...
	(gfc_trans_init_string_length):  ... to this.
	(gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
	gfc_conv_function_call): Update to new format for character variables.
	(gfc_conv_string_length): Remove.
	(gfc_conv_string_parameter): Update assertion.
	* trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
	* trans-io.c (set_string): Use new macro names.
	* trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
	* trans-types.c (gfc_get_character_type): Use existing length expr.
	(gfc_is_nodesc_array): Make public.
	(gfc_get_dtype_cst): Rename ...
	(gfc_get_dtype): ... to this.  Handle unknown size arrays.
	(gfc_get_nodesc_array_type): Use new name.
	(gfc_sym_type): New character variable code.
	(gfc_get_derived_type): Ditto.
	(gfc_get_function_type): Evaluate character variable lengths.
	* trans-types.h (gfc_strlen_kind): Define.
	(gfc_is_nodesc_array): Add prototype.
	* trans.h: Update prototypes.
	(struct lang_type): Update comments.
	* gfortran.fortran-torture/execute/strarray_1.f90: New test.
	* gfortran.fortran-torture/execute/strarray_2.f90: New test.
	* gfortran.fortran-torture/execute/strarray_3.f90: New test.
	* gfortran.fortran-torture/execute/strarray_4.f90: New test.
	* gfortran.fortran-torture/execute/strcommon_1.f90: New test.


Comment 6 Elliot Lee 2004-08-12 21:01:01 UTC
FWIW this is still happening with gcj-3.4.1-20040714
Comment 7 Tom Tromey 2007-01-09 20:45:59 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.