Bug 59572 - Not clear error message in smallest_mode_for_size in handled case
Summary: Not clear error message in smallest_mode_for_size in handled case
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.2
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2013-12-21 15:11 UTC by Christophe
Modified: 2015-01-16 18:59 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2015-01-16 00:00:00


Note You need to log in before you can comment on or make changes to this bug.
Description Christophe 2013-12-21 15:11:10 UTC

I have received this Internal Compiler error:

<built-in>:0:0: internal compiler error: in smallest_mode_for_size, at stor-layout.c:384
0x82ea77 smallest_mode_for_size
0x831d94 smallest_mode_for_size
0x831d94 layout_type(tree_node*)
0x8320b0 make_signed_type(int)
0x4da44d type_for_size
0x4da4a6 type_for_mode
0x9a5a14 build_common_builtin_nodes()
0x4d9caa ortho_init
0x4e67a6 lang_dependent_init
0x4e67a6 do_compile

I am trying to build gcc with VHDL support from GHDL:

This work quite well, except that in current case I am trying to build a cross-compiler (--target=m68k-linux-gnu). All compilation flow works well until this step:

make -C vhdl [...] ghdllib
../ghdl1 --std=87 -quiet -o std_standard.s --compile-standard

My current supposition is that while compiling the standards for VHDL languages, it encouters a type that is not supported by the current arch I am targetting (maybe a 64-bits word, or a floating point type), so if gcc's smallest_mode_for_size function was able to provide a little bit of info on the type it was being called for, it would help to investigate how to provide a solution for it.

Comment 1 Jeffrey A. Law 2015-01-16 18:59:57 UTC
We would need a compilable testcase to further investigate this problem.  The easiest way to get a compilable testcase is to add "-save-temps" to the compiler's command line.  For C code that will generate a .i file, for C++ a .ii file.  Upload that along with the full set of options on the compiler command line and we can take a look.