Bug 59572 - Not clear error message in smallest_mode_for_size in handled case
Not clear error message in smallest_mode_for_size in handled case
Status: WAITING
Product: gcc
Classification: Unclassified
Component: middle-end
4.8.2
: P3 enhancement
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-21 15:11 UTC by Christophe
Modified: 2015-01-16 18:59 UTC (History)
1 user (show)

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


Attachments

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
Hello,

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
        ../../../src/gcc-4.8.2/gcc/stor-layout.c:384
0x831d94 smallest_mode_for_size
        ../../../src/gcc-4.8.2/gcc/stor-layout.c:495
0x831d94 layout_type(tree_node*)
        ../../../src/gcc-4.8.2/gcc/stor-layout.c:2081
0x8320b0 make_signed_type(int)
        ../../../src/gcc-4.8.2/gcc/stor-layout.c:2393
0x4da44d type_for_size
        ../../../src/gcc-4.8.2/gcc/vhdl/ortho-lang.c:649
0x4da4a6 type_for_mode
        ../../../src/gcc-4.8.2/gcc/vhdl/ortho-lang.c:669
0x9a5a14 build_common_builtin_nodes()
        ../../../src/gcc-4.8.2/gcc/tree.c:9795
0x4d9caa ortho_init
        ../../../src/gcc-4.8.2/gcc/vhdl/ortho-lang.c:328
0x4e67a6 lang_dependent_init
        ../../../src/gcc-4.8.2/gcc/toplev.c:1688
0x4e67a6 do_compile
        ../../../src/gcc-4.8.2/gcc/toplev.c:1850
----------------------------------------------------------------------------

I am trying to build gcc with VHDL support from GHDL:
  http://sourceforge.net/projects/ghdl-updates/

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.

Regards,
Christophe.
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.