[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2017-02-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557

Martin Sebor  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Martin Sebor  ---
Thanks.  Resolving as fixed then.

[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2017-02-07 Thread andris at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557

Andris Pavenis  changed:

   What|Removed |Added

 CC||andris at gcc dot gnu.org

--- Comment #7 from Andris Pavenis  ---
About latest (djgpp-stdint.h) it should. Works for me with recent trunk
versions. I have not however got any feedback related to other proposed patch
version.

[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2017-02-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-02-07
 CC||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #6 from Martin Sebor  ---
Is this still a problem or did the fix in r231804 resolve it?

[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2015-12-17 Thread andris.pavenis at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557

--- Comment #5 from Andris Pavenis  ---
I have just committed to SVN trunk very similar patch (but not identical)for
djgpp-stdint.h (revision 231804)

[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2015-10-31 Thread felix.von.s at posteo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557

felix  changed:

   What|Removed |Added

 CC||felix.von.s at posteo dot de

--- Comment #4 from felix  ---
Created attachment 36628
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36628&action=edit
Fix djgpp-stdint.h (5.2.0)

I had a similar issue when building a djgpp cross-compiler. Removing the
"signed" qualifier, as proposed above, fixed it; I had no other problems
building the cross-compiler.

Attached is a patch against 5.2.0. Please note that I left "signed char"
intact; this is because of -funsigned-char (and it still fixes the crash). I'd
suggest to apply it and close this bug; there probably isn't anything else to
do here.

[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2013-01-16 Thread andris.pavenis at iki dot fi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557



--- Comment #3 from Andris Pavenis  2013-01-16 
18:57:42 UTC ---

I also verified that I have already mostly applied a patch sent to gcc-bugs

recently (http://gcc.gnu.org/ml/gcc-bugs/2013-01/msg01142.html) already for my

builds, except of course one typo in the patch:



+#define INT_FAST16_TYPE "int"



I do not remeber any more why it was done.



It would also have been be faster to report problem also to DJGPP mailing list.


[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2013-01-16 Thread andris.pavenis at iki dot fi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557



Andris Pavenis  changed:



   What|Removed |Added



 CC||andris.pavenis at iki dot

   ||fi



--- Comment #2 from Andris Pavenis  2013-01-16 
18:33:01 UTC ---

I do not remeber that I ever have seen this problem.



It looks that in the first case (message from 2009-10-03) my build for DJGPP

v2.03 has been used. For that case I would suggest to remove command line

option -fpch-preprocess. I initially had problem using PCH for DJGPP and after

that I always used --disable-pch. 



About second message: Are You using unmodified gcc sources on Ubuntu? All

builds of GCC for DJGPP has additional changes to the original sources (I know

it would be nice to have changes submitted). For ubunto one could try to use

alien to convert my RPM packages available from

ftp://ftp.delorie.com/pub/djgpp/rpms (or my latest test build at

http://ap1.pp.fi/djgpp/gcc/test/4.8.0-20130111/) to .deb (I'm specially

performing RPM builds to reduce possible dependence on system as much as

possible so it is rather likely that packages should work on Ubuntu after

converted to .deb)


Re: [Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2013-01-13 Thread Alexander Marquardt
After spending hours to find the cause of the segmentation fault i found out 
that the problem coausing source is the gcc/config/i386/djgpp-stdint.h wich 
uses the identifier "signed" to declare signed types. 

Reading the top of the c_common_nodes_and_builins() function in c-common.c it 
tells:
  /* `signed' is the same as `int'.  FIXME: the declarations of "signed",
 "unsigned long", "long long unsigned" and "unsigned short" were in C++
 but not C.  Are the conditionals here needed?  */

So there is no need to declare "signed [char|int|long]" when char, int and long 
are already signed types. The identifier_global_value() function returns 0 if 
the type name is not registered causing a segmentation fault in TREE_TYPE() 
when calling it with nil.

Solution:
remove all keywords "signed" in djgpp-stdint.h

I've provided a patch for gcc-4.7.2 wich will probalby apply on other versions 
too.

[djcpp-4.7.2.patch]-

--- a/gcc/config/i386/djgpp-stdint.h 2013-01-13 15:06:51.567593797 +0100
+++ b/gcc/config/i386/djgpp-stdint.h 2013-01-13 15:31:24.614591760 +0100
@@ -21,10 +21,10 @@

 /* Exact-width integer types */

-#define INT8_TYPE "signed char"
-#define INT16_TYPE "signed short int"
-#define INT32_TYPE "signed long int"
-#define INT64_TYPE "signed long long int"
+#define INT8_TYPE "char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "long int"
+#define INT64_TYPE "long long int"

 #define UINT8_TYPE "unsigned char"
 #define UINT16_TYPE "short unsigned int"
@@ -33,10 +33,10 @@

 /* Minimum-width integer types */

-#define INT_LEAST8_TYPE "signed char"
-#define INT_LEAST16_TYPE "signed short int"
-#define INT_LEAST32_TYPE "signed int"
-#define INT_LEAST64_TYPE "signed long long int"
+#define INT_LEAST8_TYPE "char"
+#define INT_LEAST16_TYPE "short int"
+#define INT_LEAST32_TYPE "int"
+#define INT_LEAST64_TYPE "long long int"

 #define UINT_LEAST8_TYPE "unsigned char"
 #define UINT_LEAST16_TYPE "short unsigned int"
@@ -45,10 +45,10 @@

 /* Fastest minimum-width integer types */

-#define INT_FAST8_TYPE "signed char"
-#define INT_FAST16_TYPE "signed int"
-#define INT_FAST32_TYPE "signed int"
-#define INT_FAST64_TYPE "long long signed int"
+#define INT_FAST8_TYPE "char"
+#define INT_FAST16_TYPE "int"
+#define INT_FAST32_TYPE "int"
+#define INT_FAST64_TYPE "long int"

 #define UINT_FAST8_TYPE "unsigned char"
 #define UINT_FAST16_TYPE "unsigned int"
[END OF PATCH]-




[Bug target/41557] gcc.exe: Internal error: (null) (program cc1plus)

2012-03-04 Thread fabrizio.ge at tiscali dot it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41557

Fabrizio Gennari  changed:

   What|Removed |Added

 CC||fabrizio.ge at tiscali dot
   ||it

--- Comment #1 from Fabrizio Gennari  2012-03-04 
17:24:31 UTC ---
Just tried building gcc-4.6.3 as DJGPP cross-compiler running on Ubuntu, but
encountered a very similar bug to this one, only occurring in cc1 instead of
cc1plus.

The compiler builds fine, but then, when it has to compile libgcc, it
segfaults.

I tried running the compiler with a trivial C program (int main(){return 0;}).
It segfaults.

I tried to debug cc1 with gdb. The lines causing the crash are in c-common.c:
int16_type_node =
  TREE_TYPE (identifier_global_value (c_get_ident (INT16_TYPE)));

The call to identifier_global_value() returns NULL, and the pointer is
dereferenced by the macro TREE_TYPE, causing the crash.

This means that DJGPP cannot be used as a target with recent versions of gcc.
It may be little used nowadays, but, since it is not unsupported, it should
work.