Share

Open Research Compiler - Aurora

Tracker: Support Requests

5 incorrect num_entries of a switch WN - ID: 513653
Last Update: Comment added ( scchan1 )

Below is from Peng Zhao at ualberta:

Pro64 compiler awlays makes the num_entries
of a switch WN one
less than the actual entries. Thus sometimes it fails
with the follwoing
message:

### XGOTO/COMPGOTO: goto_count=4 n_targ=3



One suspicious place is
in ./osprey1.0/g++fe/wfe_stmt.cxx or the
one in gccfe:

in WFE_Expand_End_Case() there is :

n = case_info_i - switch_info_stack
[switch_info_i].start_case_index;

btw:
Is the font end of Pro64 implentmented by SGI
(to be compatible
with gcc)?




Tuo LingYun ( tuo_tony ) - 2002-02-06 08:06

5

Closed

None

Zhao Qing yu

Assertion failure

v1.0.0

Public


Comments ( 2 )




Date: 2002-02-06 21:54
Sender: scchan1

Logged In: YES
user_id=163067

This is bridge between the gnu frontends and the ORC
optimizers that produces Whirl and symbol table.
I think your fix is in the right place. There is no
compatibility issue here.
Sun


Date: 2002-02-06 13:53
Sender: zhao_qingyu

Logged In: YES
user_id=254180

I think Zhao,Peng is right.
Two files need to be modified:
osprey1.0/gccfe/wfe_stmt.cxx and
osprey1.0/g++fe/wfe_stmt.cxx

Both in WFE_Expand_End_Case():
n = case_info_i - switch_info_stack
[switch_info_i].start_case_index;

Change that with
n = case_info_i - switch_info_stack
[switch_info_i].start_case_index + 1;

Where n is the num_entry to be used when create a swith WN
soon. So the num_entry in swith-WN are all less by 1 than
it should be.

It is WN_annotate() that checks this error out.
But this bug has nothing to do with Whirl profiling.



Log in to comment.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2002-02-06 13:55 zhao_qingyu
priority 9 2002-02-06 13:55 zhao_qingyu
close_date - 2002-02-06 13:55 zhao_qingyu