public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* patch that FIXED regression PR opt/7687 (still broken in 3.2 branch)
@ 2002-12-20 16:26 Janis Johnson
  2002-12-27  4:02 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Janis Johnson @ 2002-12-20 16:26 UTC (permalink / raw)
  To: gcc, rth; +Cc: bangerth

The regression reported in PR optimization/7687, which is still broken
on the 3.2 branch, was fixed on the mainline with this patch.  Given
the size of the patch, it's probably unlikely that this information
will be very useful.

2002-10-22  Richard Henderson  <rth@redhat.com>

	* target.h (gcc_target.asm_out): Merge output_mi_thunk and
	output_mi_vcall_thunk into a single hook.  Add can_output_mi_thunk.
	* target-def.h (TARGET_ASM_OUTPUT_MI_THUNK): Don't conditionalize.
	(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove.
	(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
	(TARGET_ASM_OUT): Update.
	* hooks.c (hook_bool_tree_hwi_hwi_tree_false): New.
	(hook_bool_tree_hwi_hwi_tree_true): New.
	(default_can_output_mi_thunk_no_vcall): New.
	* hooks.h: Declare them.
	* system.h (ASM_OUTPUT_MI_THUNK): Poison.

	* config/alpha/alpha.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
	(alpha_output_mi_thunk_osf): Add VCALL_OFFSET parameter.
	* config/arm/arm.c, config/cris/cris.c, config/frv/frv.c,
	config/i960/i960.c, config/ia64/ia64.c, config/m68k/m68k.c,
	config/mmix/mmix.c, config/pa/pa.c, config/sparc/sparc.c,
	config/stormy16/stormy16.c: Similarly.

	* config/i386/i386.c (x86_output_mi_thunk): Merge vcall_offset code.
	Handle 64-bit properly.  Streamline.
	(x86_output_mi_vcall_thunk): Remove.
	(x86_this_parameter): Rename from ia32_this_parameter; handle 64-bit.
	(x86_can_output_mi_thunk): New.
	(TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Remove.
	(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
	(override_options): Don't zap targetm.asm_out.output_mi_vcall_thunk.

	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Rename from
	output_mi_thunk; make static; always use function_section.
	(TARGET_ASM_OUTPUT_MI_THUNK): New.
	(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
	(rs6000_ra_ever_killed): Test no_new_pseudos not
	targetm.asm_out.output_mi_thunk in conjunction with thunks.
	* config/rs6000/rs6000-protos.h: Update.
	* config/rs6000/sysv4.h (TARGET_ASM_OUTPUT_MI_THUNK): Remove.
	* config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Don't call
	xcoffout_declare_function when using rs6000_output_mi_thunk.

	* config/s390/s390.c (s390_output_mi_thunk): Rename from
	s390_output_mi_vcall_thunk.
	(TARGET_ASM_OUTPUT_MI_THUNK): Remove.
	(TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.

	* config/vax/vax.c (vax_output_mi_thunk): Static; add vcall_offset.
	(TARGET_ASM_OUTPUT_MI_THUNK, TARGET_ASM_CAN_OUTPUT_MI_THUNK): New.
	* config/vax/vax-protos.h: Update.
	* config/vax/vax.h (ASM_OUTPUT_MI_THUNK): Remove.

2002-10-22  Richard Henderson  <rth@redhat.com>

	* method.c (use_thunk): Always compute vcall_value; assert that
	it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
	for vcall thunks as well.

Here's a small test case that causes the 3.2 branch compiler to ICE
on i686-linux:

-------------------
class A {
public:
  virtual void f1(); 
}; 
class B {
public:
  virtual void f2(); 
}; 
class C : public A, public B 
{
public:
  virtual void f1();
  virtual void f2(); 
};

void C::f2() {}
-------------------

Output from the the 3.2 branch compiler with -fPIC -mregparm=3:

7687.C: In member function `void C::_ZThn4_N1C2f2Ev()':
7687.C:16: Internal compiler error in x86_output_mi_thunk, at
   config/i386/i386.c:12655
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

I'll add this information to the PR.

Janis

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

* Re: patch that FIXED regression PR opt/7687 (still broken in 3.2 branch)
  2002-12-20 16:26 patch that FIXED regression PR opt/7687 (still broken in 3.2 branch) Janis Johnson
@ 2002-12-27  4:02 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2002-12-27  4:02 UTC (permalink / raw)
  To: Janis Johnson; +Cc: gcc, bangerth

On Fri, Dec 20, 2002 at 03:07:16PM -0800, Janis Johnson wrote:
> The regression reported in PR optimization/7687, which is still broken
> on the 3.2 branch, was fixed on the mainline with this patch.  Given
> the size of the patch, it's probably unlikely that this information
> will be very useful.

The old code simply didn't handle the case in question.

          if (ix86_regparm > 2)
            abort ();

There's really no point in keeping this PR open.  Most
of the infrastructure in the quoted patch is necessary
to avoid this abort.


r~

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

end of thread, other threads:[~2002-12-27  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 16:26 patch that FIXED regression PR opt/7687 (still broken in 3.2 branch) Janis Johnson
2002-12-27  4:02 ` Richard Henderson

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).