Bug 37341 - Internal error: Segmentation fault (program cc1)
Summary: Internal error: Segmentation fault (program cc1)
Status: RESOLVED DUPLICATE of bug 37290
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 37290
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-03 02:48 UTC by John Regehr
Modified: 2008-09-03 08:45 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Regehr 2008-09-03 02:48:32 UTC
Seen on Ubuntu Hardy on r139924.

regehr@john-home:~/volatile/tmp23$  current-gcc -O3 small.c
current-gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

regehr@john-home:~/volatile/tmp23$  current-gcc -v

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --enable-languages=c,c++ --prefix=/home/regehr : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion : (reconfigured) ../configure --program-prefix=current- --prefix=/home/regehr --enable-languages=c,c++ --no-create --no-recursion
Thread model: posix
gcc version 4.4.0 20080903 (experimental) (GCC) 

regehr@john-home:~/volatile/tmp23$  cat small.c

typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
__extension__ typedef long long int int64_t;
typedef unsigned int uint32_t;
static inline int
lshift_s_s (int left, int right)
{
  if ((left < 0) || (right < 0) || (right >= sizeof (int) * 8)
      || (left > (1 >> right)))
    return left;
}
static inline uint32_t
safe_mul_int32_t_s_s (int32_t si1, int32_t si2)
{
  if (si2 > 0)
    {
    }
  else if ((si1) && (si2 < (2147483647 / si1)))
    return si1;
  return si1 * si2;
}
static inline uint32_t
safe_mod_int32_t_s_s (int32_t si1, uint32_t si2)
{
}
static inline uint32_t
safe_div_int32_t_s_s (int32_t si1, uint32_t si2)
{
  return si1;
}

int16_t g_223;
int32_t g_243;
int32_t func_100 (int8_t p_102, int64_t p_104);
uint32_t
func_45 (int64_t p_47, uint32_t p_48, uint32_t p_49)
{
  for (0; 1; 1)
    {
      uint32_t l_281;
      if (safe_div_int32_t_s_s
	  ((safe_mul_int32_t_s_s
	    (func_100 (p_48, 1),
	     (lshift_s_s (g_223, g_243)))) < (safe_mod_int32_t_s_s (l_281,
								    p_48)),
	   1))
	return 1;
    }
}
int32_t
func_100 (int8_t p_102, int64_t p_104)
{
  int8_t l_105 = 0xB6L;
  return l_105;
}
Comment 1 Andrew Pinski 2008-09-03 03:10:04 UTC
Looks like the same as PR 37290.
Comment 2 John Regehr 2008-09-03 03:12:51 UTC
(In reply to comment #1)
> Looks like the same as PR 37290.
> 

Sorry... I misremembered that the last segfault I reported had been fixed already.
Comment 3 Richard Biener 2008-09-03 08:45:29 UTC
It is.

*** This bug has been marked as a duplicate of 37290 ***
Comment 4 Jakub Jelinek 2008-10-08 08:13:54 UTC
Subject: Bug 37341

Author: jakub
Date: Wed Oct  8 08:12:25 2008
New Revision: 140966

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140966
Log:
	PR target/36635
	PR target/37290
	PR rtl-optimization/37341
	* cse.c (cse_cc_succs): Add ORIG_BB argument, don't follow edges
	to ORIG_BB, pass through ORIG_BB recursively.
	(cse_condition_code_reg): Adjust caller.

	* gcc.c-torture/compile/pr37341.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr37341.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cse.c
    trunk/gcc/testsuite/ChangeLog