public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97377] New: Segmentation fault while compiling Marlin code
@ 2020-10-12  6:20 laurent_barthelemy at protonmail dot com
  2020-10-12  7:55 ` [Bug c++/97377] " marxin at gcc dot gnu.org
  2021-10-01  9:58 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: laurent_barthelemy at protonmail dot com @ 2020-10-12  6:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97377

            Bug ID: 97377
           Summary: Segmentation fault while compiling Marlin code
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: laurent_barthelemy at protonmail dot com
  Target Milestone: ---

Created attachment 49345
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49345&action=edit
Compiler output as an .ii file

Hi,

I'm having an issue compiling Marlin code for my 3D printer.

The general error is a segmentation fault.

Gcc version: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
System: Linux Mint 20 Ulyana
Platform: HP EliteBook 8740W (not sure it is relevant)

The message (and compiler options) is below:

/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -MMD -c -mmcu=atmega2560
-DF_CPU=16000000L -DARDUINO=105  -D__PROG_TYPES_COMPAT__
-I/usr/share/arduino/hardware/arduino//cores/arduino
-I/usr/share/arduino/hardware/arduino//variants/standard   
-I/usr/share/arduino/libraries/SPI   
-I/usr/share/arduino/libraries/SoftwareSerial   
-I/usr/share/arduino/libraries/U8glib/src   
-I/usr/share/arduino/libraries/Wire -I/usr/share/arduino/libraries/Wire/utility
  -Wall -ffunction-sections -fdata-sections -Os -save-temps
-fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations
-fsanitize=undefined -DF_CPU=16000000L  -I . -I /home/laurent/Marlin/build -I
/usr/share/arduino/hardware/arduino/avr/cores/arduino -I
/usr/share/arduino/hardware/arduino/avr/libraries/SPI -I
/usr/share/arduino/hardware/arduino/avr/libraries/SPI/src -I
/usr/share/arduino/libraries/LiquidCrystal/src -I
/usr/share/arduino/libraries/U8glib -I
/usr/share/arduino/libraries/U8glib/utility -I
/usr/share/arduino/hardware/arduino/variants/mega -Os -Wall   
-fno-use-cxa-atexit -fno-threadsafe-statics -w -fsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections
-fdata-sections -flto -DARDUINO=105 -DMOTHERBOARD=405  -std=gnu++11
ultralcd.cpp -o build-uno/ultralcd.cpp.o
In file included from /usr/share/arduino/libraries/U8glib/src/U8glib.h:42:0,
                 from ultralcd_impl_DOGM.h:46,
                 from ultralcd.cpp:96:
/usr/share/arduino/libraries/U8glib/src/clib/u8g.h:123:24: erreur interne du
compilateur: dans type_hash_canon, à tree.c:6953
typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                        ^


/usr/share/arduino/libraries/U8glib/src/clib/u8g.h:123:24: erreur interne du
compilateur: Erreur de segmentation
avr-g++: erreur interne du compilateur: Erreur de segmentation (program
cc1plus)
Veuillez soumettre un rapport d’anomalies complet,
avec la sortie du préprocesseur si nécessaire.
Voir <http://gcc.gnu.org/bugs.html> pour les instructions.
make: *** [/usr/share/arduino/Arduino.mk:1234 : build-uno/ultralcd.cpp.o]
Erreur 4




Sorry, can't get my locale to point en English, I hope the messages are
understandable by themselves

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

* [Bug c++/97377] Segmentation fault while compiling Marlin code
  2020-10-12  6:20 [Bug c++/97377] New: Segmentation fault while compiling Marlin code laurent_barthelemy at protonmail dot com
@ 2020-10-12  7:55 ` marxin at gcc dot gnu.org
  2021-10-01  9:58 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-12  7:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97377

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-10-12
             Status|UNCONFIRMED                 |NEW
                 CC|                            |chertykov at gmail dot com,
                   |                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed with the current master:

$ cat ultralcd.ii
typedef unsigned prog_uint8_t __attribute__((__progmem__ ));
typedef unsigned __attribute__((__progmem__)) u8g_pgm_uint8_t;

$ /home/marxin/Programming/gcc2/objdir/gcc/xgcc
-B/home/marxin/Programming/gcc2/objdir/gcc/ ultralcd.ii -c
ultralcd.ii:2:47: internal compiler error: in type_hash_canon, at tree.c:7149
    2 | typedef unsigned __attribute__((__progmem__)) u8g_pgm_uint8_t;
      |                                               ^~~~~~~~~~~~~~~
0x163a64e type_hash_canon(unsigned int, tree_node*)
        /home/marxin/Programming/gcc2/gcc/tree.c:7149
0xc6e445 build_type_attribute_qual_variant(tree_node*, tree_node*, int)
        /home/marxin/Programming/gcc2/gcc/attribs.c:1166
0x17076ab avr_handle_progmem_attribute
        /home/marxin/Programming/gcc2/gcc/config/avr/avr.c:9663
0xc6f48a decl_attributes(tree_node**, tree_node*, int, tree_node*)
        /home/marxin/Programming/gcc2/gcc/attribs.c:723
0xa18cfc cplus_decl_attributes(tree_node**, tree_node*, int)
        /home/marxin/Programming/gcc2/gcc/cp/decl2.c:1595
0x9d6470 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        /home/marxin/Programming/gcc2/gcc/cp/decl.c:5267
0xaf1856 cp_parser_init_declarator
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:20936
0xae46c1 cp_parser_simple_declaration
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:13878
0xae4263 cp_parser_block_declaration
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:13704
0xae3f51 cp_parser_declaration
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:13577
0xae4041 cp_parser_toplevel_declaration
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:13606
0xad0929 cp_parser_translation_unit
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:4793
0xb305ab c_parse_file()
        /home/marxin/Programming/gcc2/gcc/cp/parser.c:44172
0xcc3a2d c_common_parse_file()
        /home/marxin/Programming/gcc2/gcc/c-family/c-opts.c:1188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Adding port maintainer to CC.

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

* [Bug c++/97377] Segmentation fault while compiling Marlin code
  2020-10-12  6:20 [Bug c++/97377] New: Segmentation fault while compiling Marlin code laurent_barthelemy at protonmail dot com
  2020-10-12  7:55 ` [Bug c++/97377] " marxin at gcc dot gnu.org
@ 2021-10-01  9:58 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-01  9:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97377

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gatk555 at gmail dot com

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 94437 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-10-01  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12  6:20 [Bug c++/97377] New: Segmentation fault while compiling Marlin code laurent_barthelemy at protonmail dot com
2020-10-12  7:55 ` [Bug c++/97377] " marxin at gcc dot gnu.org
2021-10-01  9:58 ` pinskia at gcc dot gnu.org

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