ed clock and a shift mode in which in response to the scan enable signal, one of the data stored in the flipflop and test data input from outside is shifted to a subsequent flipflop in synchronization with the predetermined clock, a clock generator which generates a clock signal in response to one of the rising edge and the falling edge of the clock pulse of another clock signal input from outside