This is the mail archive of the
mailing list for the GCC project.
ICE for overlap of asm-register-declared variable and asm clobber list [H8/S target]
- From: "Prafulla Thakare" <PrafullaT at KPITCummins dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 13 May 2004 15:27:54 +0530
- Subject: ICE for overlap of asm-register-declared variable and asm clobber list [H8/S target]
Following code gives ICE (Internal compilation Error). I am compiling it for H8/S target.
void bug(char* dst)
register char* _dst __asm ("er6");
command used is:
>h8300-elf-gcc.exe -S bug.c bug.c
What is expected from this code while compiling is "Simple error" saying "asm-specifier for variable 'dst' conflicts with asm clobber list". Instead, it is giving an "Internal Compiler Error".
Please refer to earlier posting related to this at http://gcc.gnu.org/ml/gcc-patches/2002-09/msg01168.html.
As per this patch, this conflict is detected in function "expand_asm_operands()" (stmt.c) while doing "SANITY" check for overlap between clobbers and output operands.
I have two queries regarding this;
1. As it is well know conflict and error, does it really necessary to give an "Internal Compiler Error"? Or simple conflict error will do? I understand that, the compiler is expected to catch this conflict much earlier and output the error.
2. Where the compiler should catch this error prior to above mention "SANITY" check? I guess it should be able to this in "decl_conflicts_with_clobbers_p()" function. I would like to fix the above problem i.e. Compiler should detect above as clobber conflict and display the error "asm-specifier for variable 'dst' conflicts with asm clobber list" and NOT the ICE.
Any help on this would be highly appreciated.